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

Function getScopes

packages/cloudflare/src/async.ts:27–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 }>();
26
27 function getScopes(): { scope: Scope; isolationScope: Scope } {
28 const scopes = asyncStorage.getStore();
29
30 if (scopes) {
31 return scopes;
32 }
33
34 // fallback behavior:
35 // if, for whatever reason, we can't find scopes on the context here, we have to fix this somehow
36 return {
37 scope: getDefaultCurrentScope(),
38 isolationScope: getDefaultIsolationScope(),
39 };
40 }
41
42 function withScope<T>(callback: (scope: Scope) => T): T {
43 const scope = getScopes().scope.clone();

Callers 6

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