(span: Span | undefined, scope: Scope, isolationScope: Scope)
| 23 | |
| 24 | /** Store the scope & isolation scope for a span, which can the be used when it is finished. */ |
| 25 | export function setCapturedScopesOnSpan(span: Span | undefined, scope: Scope, isolationScope: Scope): void { |
| 26 | if (span) { |
| 27 | addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, makeWeakRef(isolationScope)); |
| 28 | // We don't wrap the scope with a WeakRef here because webkit aggressively garbage collects |
| 29 | // and scopes are not held in memory for long periods of time. |
| 30 | addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Grabs the scope and isolation scope off a span that were active when the span was started. |
no test coverage detected