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

Function withScope

packages/deno/src/async.ts:50–56  ·  view source on GitHub ↗
(callback: (scope: Scope) => T)

Source from the content-addressed store, hash-verified

48 }
49
50 function withScope<T>(callback: (scope: Scope) => T): T {
51 const scope = getScopes().scope.clone();
52 const isolationScope = getScopes().isolationScope;
53 return asyncStorage.run({ scope, isolationScope }, () => {
54 return callback(scope);
55 });
56 }
57
58 function withSetScope<T>(scope: Scope, callback: (scope: Scope) => T): T {
59 const isolationScope = getScopes().isolationScope.clone();

Callers 4

suppressTracingFunction · 0.70
wrapFunction · 0.50
handlerFunction · 0.50
componentDidCatchMethod · 0.50

Calls 4

getScopesFunction · 0.70
cloneMethod · 0.65
runMethod · 0.65
callbackFunction · 0.50

Tested by

no test coverage detected