Closed zorji closed 5 years ago
Not as of now, there's open issue for this – https://github.com/getsentry/sentry-javascript/issues/1622
You can create a custom integration that'd do that though.
class ResolveSourceMaps {
constructor() {
this.name = "ResolveSourceMaps";
}
setupOnce() {
Sentry.addGlobalEventProcessor(async (event) => {
if (getCurrentHub().getIntegration(ResolveSourceMaps)) {
await this.processSourceMaps(event)
}
return event;
});
}
async processSourceMaps(event) {
// do your work here
}
}
Sentry.init({
dsn: "https://363a337c11a64611be4845ad6e24f3ac@sentry.io/297378",
integrations: [new ResolveSourceMaps()]
})
Keep in mind that it can be very costly and you should cache all your I/O reads.
Thanks @kamilogorek
I am writing an AWS Lambda + Typescript and trying to integrate Sentry to capture the errors but I couldn't make the source show correctly in Sentry.
The source maps files are available at run time. Is it possible to make Sentry read these source maps instead of uploading to Sentry?
For my case, the error stack trace looks like something like this
The path is something like
webpack:/src/Nested.ts:9:11
Is it possible to make Sentry or override Sentry to read from my local source map?
Thanks