-
-
Save ajmasia/c10005f6fd2ecd61bef5c0aa1fdf5803 to your computer and use it in GitHub Desktop.
| 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 | |
| */ |
@mehrdadmms, are you running these two functions in their respective processes?
Yes I ran ElectronCrashReporter in backend.js and VueCrashReporter in main.js
should I run it in a specific function or any where in the file is ok ?
@ajmasia
@mehrdadmms, I imagine you have well configured environment variables and the sentyDSN is ok ....
Please check from your backend.js file a manual captureException or captureMessage
import {
captureException as captureExceptionToSentry,
captureMessage as captureMessageToSentry,
} from '@sentry/electron'
captureExceptionToSentry('some error')
captureMessageToSentry('some message')If don't works it's seems its a config data issue 😄
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
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
💪
I'm trying to use this with electron+vue2 but I don't get any errors in my sentry dashboard