From c1a1ae8b9202bb15336d991eb9bac9c7640e7935 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Fri, 13 Dec 2024 09:56:23 -0500 Subject: [PATCH] fix: Normalise ANR debug image file paths if appRoot was supplied --- packages/node/src/integrations/anr/worker.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/node/src/integrations/anr/worker.ts b/packages/node/src/integrations/anr/worker.ts index 354cea514618..b5f45fc6fcb3 100644 --- a/packages/node/src/integrations/anr/worker.ts +++ b/packages/node/src/integrations/anr/worker.ts @@ -104,11 +104,13 @@ function applyDebugMeta(event: Event): void { if (filenameToDebugId.size > 0) { const images: DebugImage[] = []; - for (const [filename, debugId] of filenameToDebugId.entries()) { + for (const [filename, debug_id] of filenameToDebugId.entries()) { + const code_file = options.appRootPath ? normalizeUrlToBase(filename, options.appRootPath) : filename; + images.push({ type: 'sourcemap', - code_file: filename, - debug_id: debugId, + code_file, + debug_id, }); } event.debug_meta = { images };