feat: RewriteFrames pluggable integration for Node#1611
feat: RewriteFrames pluggable integration for Node#1611kamilogorek wants to merge 3 commits intomasterfrom
Conversation
Generated by 🚫 dangerJS |
|
All good but honestly I don't like the |
|
It's not that simple. I described it in here https://docs.sentry.io/clients/node/typescript/ |
|
You don't need to figure out root directory by yourself, it can be passed as a flag to |
|
Another reason: bundling application into single file on node side practically never happens, usually application is executed without bundling anything |
It happens a lot in serverless environments :) Everything you want to do can be easily achieved with: init({
integrations: [new Sentry.Integrations.RewriteFrames({
iteratee: (frame) => ({
..frame,
filename: frame.filename.startsWith('/') ? `app:///${path.relative(root, frame.filename)}` : frame.filename;
})
})]
})Using |
|
I guess this method it's fine if RewriteFrames is not enabled by default. Maybe little verbose and requires to import init({
integrations: [new Sentry.Integrations.RewriteFrames({ root })]
})(of course iteratee could stay for advanced use cases) |
|
Agree with |
|
@kamilogorek Just one more question about decision to use |
|
No, |
|
maybe |
|
You can already achieve this using custom |
69f1dfc to
7e715ec
Compare
7e715ec to
0ad418d
Compare
|
Merged manually |
So that users don't have to write this nasty snippet anymore – https://docs.sentry.io/clients/node/sourcemaps/#updating-raven-configuration-to-support-source-maps
Configurable through:
Ref: getsentry/sentry#2632 (comment)