-
Notifications
You must be signed in to change notification settings - Fork 24
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
Any info on source-maps? #26
Comments
I'm using webpack-sentry-plugin. You'll need to configure webpack to generate source maps: https://webpack.js.org/configuration/devtool/ |
So, I'm using Rollup and Sentry CLI instead of Webpack to create the bundle and submit the sourcemaps and I can't get Sentry to recognize the stack frames. My setup generates 2 files in the When Cloudflare's runtime generates an error, the filename is always I'l try to setup a webpack project later to test if there is any difference. |
I'm having exactly the same issue. Currently I'm just living with it. Would
love to be able to get it working.
…On Wed, 22 Jul 2020, 22:35 Leandro Aguiar, ***@***.***> wrote:
So, I'm using Rollup and Sentry CLI instead of Webpack to create the
bundle and submit the sourcemaps and I can't get Sentry to recognize the
stack frames.
My setup generates 2 files in the dist/ folder: worker.js and
worker.js.map.
When Cloudflare's runtime generates an error, the filename is always
worker.js and I'm suspecting that Sentry doesn't match it to the
~/worker.js file uploaded during release.
I'l try to setup a webpack project later to test if there is any
difference.
In the meantime, do you have any thoughts?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHZFBYK762WPZRQ3EPLSXTR45LRTANCNFSM4MSXRGKQ>
.
|
How do you deploy your worker? Are you using wrangler? I haven't tried Rollup to compile Workers but wrangler is using webpack under the hood, which would explain the discrepancy - 2 different compilers will probably give you 2 different outputs. You can compare your Rollout bundle with wrangler's final bundle to verify ( Are your stack traces in Sentry completely missing, or just showing nonsense? |
I'm using standalone webpack build and the sentry-webpack-plugin to upload source-maps. Then I use the CF worker deployment api directly to upload the |
There is no Webpack involved in my setup, I'm using the Sentry CLI to make the release and Cloudflare API to deploy the worker (I didn't like the way wrangler handles the configuration). I do get the Exception info, but its all mangled. |
Looking at the JSON payload from my events I see that the frame property Could we make |
Thanks for this info. Source-maps definitely deserve some love. It looks like both Sentry CLI and sentry-webpack-plugin prepend the path with ~/ by default. We can provide I also realized that we should send stack frames reversed, and also provide stack trace in |
I'm going to deploy these changes as |
|
Great, I'll test it now. |
It works... but not the default. Leaving the url prefix as the default |
I added more flexible const toucan = new Toucan({
dsn: VALID_DSN,
event,
rewriteFrames: {
iteratee: (frame) => {
frame.filename = `/opt/router/${frame.filename}`;
return frame;
},
},
}); |
I can confirm, switching to absolute paths finally made source maps work for me |
Interesting. Can you give it any arbitrary absolute path? |
Seems like that as long as the absolute paths on the stack frames and Sentry's artifacts match it will work, doesn't matter which absolute path. |
Seems so, I used |
Using |
I added |
Thanks for the lib, looks great. Wondering if you have any advice on source maps or legible stack traces in the Sentry Dashboar?
The text was updated successfully, but these errors were encountered: