(span: Span)
| 36 | * If WeakRef was used and scopes have been garbage collected, returns undefined for those scopes. |
| 37 | */ |
| 38 | export 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. |
no test coverage detected