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

Function triggerHandlers

packages/core/src/instrument/handlers.ts:60–77  ·  view source on GitHub ↗
(type: InstrumentHandlerType, data: unknown)

Source from the content-addressed store, hash-verified

58
59/** Trigger handlers for a given instrumentation type. */
60export function triggerHandlers(type: InstrumentHandlerType, data: unknown): void {
61 const typeHandlers = type && handlers[type];
62 if (!typeHandlers) {
63 return;
64 }
65
66 for (const handler of typeHandlers) {
67 try {
68 handler(data);
69 } catch (e) {
70 DEBUG_BUILD &&
71 debug.error(
72 `Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError:`,
73 e,
74 );
75 }
76 }
77}

Callers 12

handlers.test.tsFile · 0.90
instrumentConsoleFunction · 0.90
instrumentErrorFunction · 0.90
instrumentFetchFunction · 0.90
streamHandlerFunction · 0.90
wrapperFunction · 0.90
patchWithDefinePropertyFunction · 0.90
instrumentHistoryFunction · 0.90
applyFunction · 0.90

Calls 3

getFunctionNameFunction · 0.90
errorMethod · 0.65
handlerFunction · 0.50

Tested by

no test coverage detected