Skip to content

fix(node): Mark stack frames with url protocol as in-app frames #8008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 3, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented May 2, 2023

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Generally, this LGTM but in_app might also be overridden by stack trace processing. Which in turn is also influenced by source maps rewriting through Sentry CLI.

I don't have a lot of context on the original issue but if the source maps were uploaded with the webpack plugin (v1), we recently merged in a fix to Sentry CLI v1 which fixed a source maps rewriting bug for file names starting with webpack://. Perhaps this fixes it.

@lforst
Copy link
Contributor Author

lforst commented May 2, 2023

I don't have a lot of context on the original issue but if the source maps were uploaded with the webpack plugin (v1), we recently merged in a fix to Sentry CLI v1 which fixed a source maps rewriting bug for file names starting with webpack://. Perhaps this fixes it.

Wait, what was that bug again?

@Lms24
Copy link
Member

Lms24 commented May 2, 2023

This PR describes the fix. Tbh I'm not sure that this is related as this only surfaced in Angular apps but I guess depending on the webpack config it could emerge in other frameworks/builds as well.

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.02 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 65.66 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.56 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 58.12 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.17 KB (0%)
@sentry/browser - Webpack (minified) 69.07 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.19 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.09 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.65 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.87 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 46.87 KB (+0.01% 🔺)
@sentry/replay - Webpack (gzipped + minified) 40.67 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 65.75 KB (+0.01% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 58.64 KB (+0.01% 🔺)

@lforst
Copy link
Contributor Author

lforst commented May 2, 2023

This PR describes the fix. Tbh I'm not sure that this is related as this only surfaced in Angular apps but I guess depending on the webpack config it could emerge in other frameworks/builds as well.

@Lms24 ah that looks unrelated. The stack traces look fine, it's just that we mark them as in_app false. Thanks for the heads-up though! :)

@Lms24
Copy link
Member

Lms24 commented May 2, 2023

It probably is unrelated. For the sake of completeness, I'm just realizing I didn't explain this properly. Because of the wrong source path caused by the bug I described above, the frames were incorrectly set to in_app: false regardless of if they were (forcefully) set to in_app: true in the code or not. So the SDK value didn't matter because it was overwritten during stracktrace processing based on the incorrectly processed source map.

But yeah, in_app: false in webpack just sounded oddly familiar to me which is why I brought it up. Feel free to merge this :)

@lforst lforst merged commit e0c3229 into develop May 3, 2023
@lforst lforst deleted the lforst-node-url-inapp branch May 3, 2023 13:18
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.

GitHub code mapping does not work in Next.js server side code
3 participants