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

Function processDebugIds

packages/core/src/utils/debug-ids.ts:60–87  ·  view source on GitHub ↗
(debugIdKeys: string[], debugIdMap: Record<string, string>)

Source from the content-addressed store, hash-verified

58 }
59
60 const processDebugIds = (debugIdKeys: string[], debugIdMap: Record<string, string>): void => {
61 for (const key of debugIdKeys) {
62 const debugId = debugIdMap[key];
63 const result = parsedStackResults?.[key];
64
65 if (result && cachedFilenameDebugIds && debugId) {
66 // Use cached filename but update with current debug ID
67 cachedFilenameDebugIds[result[0]] = debugId;
68 // Update cached result with new debug ID
69 if (parsedStackResults) {
70 parsedStackResults[key] = [result[0], debugId];
71 }
72 } else if (debugId) {
73 const parsedStack = stackParser(key);
74
75 for (let i = parsedStack.length - 1; i >= 0; i--) {
76 const stackFrame = parsedStack[i];
77 const filename = stackFrame?.filename;
78
79 if (filename && cachedFilenameDebugIds && parsedStackResults) {
80 cachedFilenameDebugIds[filename] = debugId;
81 parsedStackResults[key] = [filename, debugId];
82 break;
83 }
84 }
85 }
86 }
87 };
88
89 if (sentryDebugIdMap) {
90 processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);

Callers 1

getFilenameToDebugIdMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected