-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Plugin for Electron #634
Comments
Hey @arusakov – yeah, probably. But to be honest I think we're going to start moving towards having dedicated repos/packages for raven-js environments, including React Native. e.g. sentry-electron (we're also starting to get rid of the Raven name) |
Thank you for response @benvinegar. I'm going to create PR soon. |
In the meantime, this is working okay for me:
I call it from both main and renderer processes. I added a dialog box as Electron doesn't show one after sentry gets installed. |
@joerick Your solution is about "how to setup Raven in electron app". But we talk about source maps support here. |
I have an electron app that need sourcemap support too. |
To setup Raven for Electron applications right now, you can use:
In order to use source maps correctly, it's required now to manually update filepaths, as @arusakov already mentioned. function normalizeUrl (url) {
return 'app:///' + url.replace(/.*\//, '');
}
Raven.config('__DSN__', {
dataCallback: function (data) {
data.culprit = normalizeUrl(data.culprit);
data.exception.values.forEach(function (value) {
value.stacktrace.frames.forEach(function (frame) {
frame.filename = normalizeUrl(frame.filename)
});
});
return data;
}
}).install(); I'll work on fixing this directly in |
There is a full Electron SDK now: https://github.com/getsentry/sentry-electron |
@jan-auer do you know if the sdk support sourcemap? I can't find any documentation for the sourcemap. |
A PR closing this issue has just been released 🚀This issue was referenced by PR #14540, which was included in the 8.43.0 release. |
Do we need it?
I can spend some time for that, because I'm setting up sentry for electron based app and source maps support is needed.
I think electron-plugin should only strip urls like react-native-plugin does it.
The text was updated successfully, but these errors were encountered: