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

Function withIsolationScope

packages/cloudflare/src/async.ts:57–63  ·  view source on GitHub ↗
(callback: (isolationScope: Scope) => T)

Source from the content-addressed store, hash-verified

55 }
56
57 function withIsolationScope<T>(callback: (isolationScope: Scope) => T): T {
58 const scope = getScopes().scope;
59 const isolationScope = getScopes().isolationScope.clone();
60 return asyncStorage.run({ scope, isolationScope }, () => {
61 return callback(isolationScope);
62 });
63 }
64
65 function withSetIsolationScope<T>(isolationScope: Scope, callback: (isolationScope: Scope) => T): T {
66 const scope = getScopes().scope;

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected