web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

fix: sentry sourcemaps on errors

Open olizilla opened this issue 2 years ago • 5 comments

the errors are now showing up in sentry with abs_path: "orker.js" which looks like we are trimming a w from worker.js. that also suggests the file is now renamed worker.js by wrangler v2 on upload, so we rename ours in this PR.

  • worker.mjs -> worker.js to match what we see in sentry error.
  • stop stripping first char on paths in stack traces in sentry client config.
  • set rewriteFrames.root: '/' to get toucan to prepend / to make it /worker.js

see: https://github.com/web3-storage/web3.storage/pull/1033

License: (Apache-2.0 AND MIT) Signed-off-by: Oli Evans [email protected]

olizilla avatar Jun 29 '22 14:06 olizilla

Fixed! Screenshot 2022-06-29 at 16 08 57

I am at least getting faster at this.

olizilla avatar Jun 29 '22 15:06 olizilla

This isn't fully fixed yet. The sourcemaps are found on sentry, but the stacktrace still isn't useble... it doesn't point to where the error came from

olizilla avatar Jun 29 '22 15:06 olizilla

workers are outputting wrong line numbers...

hugomrdias avatar Jun 29 '22 17:06 hugomrdias

This isn't fully fixed yet. The sourcemaps are found on sentry, but the stacktrace still isn't useble... it doesn't point to where the error came from

I seem to have the same issue. Did you ever identify a reason why the CF stack traces for errors seem to be incorrect?

philipatkinson avatar Jul 15 '22 17:07 philipatkinson

Finally its fixed https://github.com/nftstorage/nft.storage/pull/2094 add no_bundle = true to wrangler.toml

hugomrdias avatar Jul 28 '22 17:07 hugomrdias

We need https://github.com/web3-storage/web3.storage/pull/1593/files#diff-af47dbf0e21ab2fbc5e41184392fcb87c93fb42a80ca6050c64db069fd447853L97

to fix our stack traces

olizilla avatar Sep 05 '22 13:09 olizilla

This is painful to rebase. Have recreated in #1838

olizilla avatar Sep 05 '22 13:09 olizilla