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

Function getScopes

packages/deno/src/async.ts:35–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 }>();
34
35 function getScopes(): { scope: Scope; isolationScope: Scope } {
36 const scopes = asyncStorage.getStore();
37
38 if (scopes) {
39 return scopes;
40 }
41
42 // fallback behavior:
43 // if, for whatever reason, we can't find scopes on the context here, we have to fix this somehow
44 return {
45 scope: getDefaultCurrentScope(),
46 isolationScope: getDefaultIsolationScope(),
47 };
48 }
49
50 function withScope<T>(callback: (scope: Scope) => T): T {
51 const scope = getScopes().scope.clone();

Callers 5

withScopeFunction · 0.70
withSetScopeFunction · 0.70
withIsolationScopeFunction · 0.70
withSetIsolationScopeFunction · 0.70

Calls 3

getDefaultCurrentScopeFunction · 0.90
getDefaultIsolationScopeFunction · 0.90
getStoreMethod · 0.65

Tested by

no test coverage detected