Skip to content

Commit 6e682c4

Browse files
timfishAbhiPrasad
andauthored
fix: Normalise ANR debug image file paths if appRoot was supplied [v8] (#14709)
We should normalise all paths in ANR events if an appRoot path is supplied. This is important for the Electron SDK where we normalise around the app path to keep usernames out of reported events. Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent c698ad9 commit 6e682c4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/node/src/integrations/anr/worker.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ function applyDebugMeta(event: Event): void {
104104

105105
if (filenameToDebugId.size > 0) {
106106
const images: DebugImage[] = [];
107-
for (const [filename, debugId] of filenameToDebugId.entries()) {
107+
for (const [filename, debug_id] of filenameToDebugId.entries()) {
108+
const code_file = options.appRootPath ? normalizeUrlToBase(filename, options.appRootPath) : filename;
109+
108110
images.push({
109111
type: 'sourcemap',
110-
code_file: filename,
111-
debug_id: debugId,
112+
code_file,
113+
debug_id,
112114
});
113115
}
114116
event.debug_meta = { images };

0 commit comments

Comments
 (0)