MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getMainCarrier

Function getMainCarrier

packages/core/src/carrier.ts:55–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
54 **/
55export function getMainCarrier(): Carrier {
56 // This ensures a Sentry carrier exists
57 getSentryCarrier(GLOBAL_OBJ);
58 return GLOBAL_OBJ;
59}
60
61/** Will either get the existing sentry carrier, or create a new one. */
62export function getSentryCarrier(carrier: Carrier): SentryCarrier {

Callers 15

bindSpanToChannelStoreFunction · 0.90
logger.test.tsFile · 0.90
traceData.test.tsFile · 0.90
setBindingProviderFunction · 0.90
trace.test.tsFile · 0.90
getCurrentScopeFunction · 0.90
getIsolationScopeFunction · 0.90
withScopeFunction · 0.90
withIsolationScopeFunction · 0.90
getTraceDataFunction · 0.90
getActiveSpanFunction · 0.90

Calls 1

getSentryCarrierFunction · 0.85

Tested by 1

setBindingProviderFunction · 0.72