Last active
October 6, 2021 17:26
-
-
Save ajmasia/c10005f6fd2ecd61bef5c0aa1fdf5803 to your computer and use it in GitHub Desktop.
Sentry config Electron + Vue2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import * as Sentry from '@sentry/electron' | |
import * as SentryIntegrations from '@sentry/integrations' | |
import { sentryDSN, eviorement, releaseVersion } from '@/config/env' | |
export const ElectronCrashReporter = () => | |
Sentry.init({ | |
dsn: sentryDSN, | |
environment: eviorement, | |
release: releaseVersion, | |
}) | |
export const VueCrashReporter = () => { | |
return Sentry.init({ | |
dsn: sentryDSN, | |
environment: eviorement, | |
integrations: [ | |
new SentryIntegrations.Vue({ | |
Vue, | |
logErrors: true, | |
tracing: false, | |
}), | |
], | |
release: releaseVersion, | |
debug: true, | |
}) | |
} | |
/** | |
* Electron main process (background.js): Import `ElectronCrashReporter` and call it | |
* Renderer process (main.js): Import `VueCrashReporter` and call it | |
*/ |
Thank you @ajmasia I see it is working now. I still don't get my errors in sentry but I think there's another problem. I was creating errors in other parts of the code (not in
background.js
) and most of our code is imported in preload and sentry doesn't capture errors that are happening in preload
💪
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you @ajmasia I see it is working now.
I still don't get my errors in sentry but I think there's another problem.
I was creating errors in other parts of the code (not in
background.js
) and most of our code is imported in preload and sentry doesn't capture errors that are happening in preload