Skip to content

Commit c5ce80a

Browse files
committed
fix(core): Ensure standalone spans are not sent if SDK is disabled
1 parent ff8e780 commit c5ce80a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/core/src/tracing/sentrySpan.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,7 @@ function sendSpanEnvelope(envelope: SpanEnvelope): void {
429429
return;
430430
}
431431

432-
const transport = client.getTransport();
433-
if (transport) {
434-
transport.send(envelope).then(null, reason => {
435-
DEBUG_BUILD && logger.error('Error while sending span:', reason);
436-
});
437-
}
432+
// sendEnvelope should not throw
433+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
434+
client.sendEnvelope(envelope);
438435
}

0 commit comments

Comments
 (0)