()
| 21 | getTracingChannelBinding?: () => TracingChannelBinding | undefined; |
| 22 | }): void { |
| 23 | function getScopes(): CurrentScopes { |
| 24 | const ctx = api.context.active(); |
| 25 | const scopes = getScopesFromContext(ctx); |
| 26 | |
| 27 | if (scopes) { |
| 28 | return scopes; |
| 29 | } |
| 30 | |
| 31 | // fallback behavior: |
| 32 | // if, for whatever reason, we can't find scopes on the context here, we have to fix this somehow |
| 33 | return { |
| 34 | scope: getDefaultCurrentScope(), |
| 35 | isolationScope: getDefaultIsolationScope(), |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | function withScope<T>(callback: (scope: Scope) => T): T { |
| 40 | const ctx = api.context.active(); |
no test coverage detected