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

Function getCapturedScopesOnSpan

packages/core/src/tracing/utils.ts:38–45  ·  view source on GitHub ↗
(span: Span)

Source from the content-addressed store, hash-verified

36 * If WeakRef was used and scopes have been garbage collected, returns undefined for those scopes.
37 */
38export function getCapturedScopesOnSpan(span: Span): { scope?: Scope; isolationScope?: Scope } {
39 const spanWithScopes = span as SpanWithScopes;
40
41 return {
42 scope: spanWithScopes[SCOPE_ON_START_SPAN_FIELD],
43 isolationScope: derefWeakRef(spanWithScopes[ISOLATION_SCOPE_ON_START_SPAN_FIELD]),
44 };
45}
46
47/**
48 * Mark a span as eligible for OTel-style `sentry.source` inference at span end.

Callers 15

utils.test.tsFile · 0.90
trace.test.tsFile · 0.90
idleSpan.test.tsFile · 0.90
spanToTraceContextFunction · 0.90
_onSpanEndedMethod · 0.90
captureSpanFunction · 0.90
handleOnSpanStartFunction · 0.90
initFunction · 0.90
scope.test.tsFile · 0.90

Calls 1

derefWeakRefFunction · 0.90

Tested by

no test coverage detected