MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / resetGlobals

Function resetGlobals

packages/cloudflare/test/testUtils.ts:4–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/core';
3
4function resetGlobals(): void {
5 getCurrentScope().clear();
6 getCurrentScope().setClient(undefined);
7 getIsolationScope().clear();
8 getGlobalScope().clear();
9}
10
11function cleanupOtel(): void {
12 // Disable all globally registered APIs

Callers 1

resetSdkFunction · 0.70

Calls 5

getCurrentScopeFunction · 0.90
getIsolationScopeFunction · 0.90
getGlobalScopeFunction · 0.90
setClientMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected