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

Function applyDebugIds

packages/core/src/utils/prepareEvent.ts:162–173  ·  view source on GitHub ↗
(event: Event, stackParser: StackParser)

Source from the content-addressed store, hash-verified

160 * Puts debug IDs into the stack frames of an error event.
161 */
162export function applyDebugIds(event: Event, stackParser: StackParser): void {
163 // Build a map of filename -> debug_id
164 const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);
165
166 event.exception?.values?.forEach(exception => {
167 exception.stacktrace?.frames?.forEach(frame => {
168 if (frame.filename) {
169 frame.debug_id = filenameDebugIdMap[frame.filename];
170 }
171 });
172 });
173}
174
175/**
176 * Moves debug IDs from the stack frames of an error event into the debug_meta field.

Callers 2

prepareEventFunction · 0.85

Calls 2

getFilenameToDebugIdMapFunction · 0.90
forEachMethod · 0.65

Tested by

no test coverage detected