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

Function getInstrumentedMap

packages/cloudflare/src/instrument.ts:9–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8// eslint-disable-next-line @typescript-eslint/no-explicit-any
9function getInstrumentedMap(): WeakMap<any, any> {
10 // eslint-disable-next-line @typescript-eslint/no-explicit-any
11 const globalObj = globalThis as typeof globalThis & { [GLOBAL_KEY]?: WeakMap<any, any> };
12 if (!globalObj[GLOBAL_KEY]) {
13 globalObj[GLOBAL_KEY] = new WeakMap();
14 }
15 return globalObj[GLOBAL_KEY];
16}
17
18/**
19 * Check if a value can be used as a WeakMap key.

Callers 2

markAsInstrumentedFunction · 0.85
getInstrumentedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected