-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Sentry doesn't have access to source maps in production #28
Comments
I noticed that the error report for sentry is working fine (in the screenshot) but it's from the server... I was wondering if at any point in time the same functionality (showing the error stack from tsx files) had worked from the browser? |
Is it working fine? It's not really the source code, it's not minified but it's not the source file either, kind of in-between. I'll try to throw an error on the browser an update it |
Yeah I noticed it's not the source code... your description is actually fine (sorry my bad) |
@a14m I've updated and added development sentry logs browser/server and indeed, server is much easier to understand. |
@a14m I created a PR to showcase both behaviours in a production environment: I updated description and added production videos for browser/server sentry logs. It's not that bad IMHO, in development the browser logs are undecipherable but in production it's rather straightforward. One fun thing is how the app behaves when there is a browser error (https://nrn-v1-ssr-mst-aptd-gcms-lcz-sty-c1-2fr19onwp.now.sh/) when you scroll down it creates 2 apps 😂 |
Interesting, I don’t have any of those problems... the debug in development works fine (when I have source maps enabled, it’s a bit cryptic unless I’m running |
From what I could read at vercel/next.js#8873 (comment), it does seem SSR has some role to play, so that could be related. Not sure how. But anyway, bad source maps in development is not a real issue, what truly matters is production, because that's where we really need them to understand what's going on, and that's my real focus. The way it currently works feels "good enough" to me.
|
Closing this, TL;DR: It works fine in production mode. |
Sentry has released See #305 |
Status
Community is free to contribute, we won't likely have the time to add this feature
Issue
Sentry doesn't have access to source maps, which makes debug harder.
I do not know how to fix that, I believe it had worked at some point in the past, but may have broken due to some dependency update.
Current configuration
https://www.npmjs.com/package/@zeit/next-source-maps is used to generate source maps
It's configured in
next.config.js
, see https://github.com/UnlyEd/next-right-now/blob/master/next.config.js#L1-L8There seems to be additional steps to send the files to Sentry, and they're complicated and require some kind of authentication to upload files to their servers. See https://docs.sentry.io/platforms/javascript/sourcemaps/
Also, it should be enabled for NODE_ENV=production only, not during development (to avoid latency due to source files upload, which would completely break DX)
Sentry logs in development (browser)
https://youtu.be/fr3LX5aGiDI
Sentry logs in development (server)
https://youtu.be/tSqi4A1yslI
Sentry logs in production (server)
https://youtu.be/S2o6YibLnvA
Sentry logs in production (browser)
https://youtu.be/kUUO-1Gyujc
Resources:
SENTRY_RELEASE
andSENTRY_ENVIRONMENT
variables, but I believe we do it already atnext-right-now/src/utils/sentry.ts
Lines 12 to 17 in 6afd12d
The text was updated successfully, but these errors were encountered: