Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Jun 16, 2023

We are currently facing the problem that the RewriteFrames integration, that is existing in many users setups, is breaking debug IDs. This is especially annoying when moving from the old release based source map process to the new debug ID based process.

How is the RewriteFrames integration is breaking debug IDs? Stack frames are linked to debug IDs via the filename value inside stack frames in the event and the debug_file value inside the debug_meta field. filename and debug_file are both generated at event creation (before any event processors run) and need to exactly match. When a RewriteFrames integration is active, it may register an event processor that modifies the filename. This causes the filename -> debug_file relationship to break, causing the entire debug ID process to break.

This PR aims to fix this by putting debug_id values directly on the stack frame objects inside events and only transferring them over to debug_meta after all event processors ran, right before the event is sent. This way, we guarantee that the stack frames will always point to a debug ID (if there is one).

@lforst lforst changed the title fix(core): Temporarily store debug IDs in stack frame and put them into debug_meta before sending fix(core): Temporarily store debug IDs in stack frame and only put them into debug_meta before sending Jun 16, 2023
@lforst lforst requested review from AbhiPrasad and mydea June 16, 2023 08:42
@lforst lforst self-assigned this Jun 16, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 16, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.17 KB (+0.26% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 66.13 KB (+0.41% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.71 KB (+0.27% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 58.6 KB (+0.45% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.33 KB (+0.24% 🔺)
@sentry/browser - Webpack (minified) 69.52 KB (+0.38% 🔺)
@sentry/react - Webpack (gzipped + minified) 21.36 KB (+0.26% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.28 KB (+0.09% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.79 KB (+0.18% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 27.03 KB (+0.18% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 49.18 KB (+1.2% 🔺)
@sentry/replay - Webpack (gzipped + minified) 42.9 KB (+1.51% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 68.2 KB (+0.84% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.09 KB (+0.91% 🔺)

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't verify this actually works as expected, but seems good to me! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants