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 hidden or 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 | |
*/ |
Author
ajmasia
commented
Oct 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment