From f00cd8726645d803a41fa59cb76e566d256ec749 Mon Sep 17 00:00:00 2001 From: Venipa Date: Mon, 28 Oct 2024 21:47:47 +0100 Subject: [PATCH] feat: enable sentry again for new backend --- src/app/utils/sentry.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/app/utils/sentry.ts b/src/app/utils/sentry.ts index ed8cfd6..5966b2f 100644 --- a/src/app/utils/sentry.ts +++ b/src/app/utils/sentry.ts @@ -1,6 +1,5 @@ -import { isDevelopment } from "@/app/utils/devUtils"; import logger from "@/utils/Logger"; -import * as Sentry from "@sentry/electron/main"; +import * as Sentry from "@sentry/electron"; let enabledReporting = true; export const setSentryEnabled = (enable: boolean) => { if (enabledReporting !== enable) enabledReporting = enable; @@ -8,15 +7,14 @@ export const setSentryEnabled = (enable: boolean) => { else logger.child("Sentry").warn("Sentry has been enabled"); }; -if (!isDevelopment && process.type !== "renderer") { - if (process.env.VUE_APP_SENTRY_DSN) - Sentry.init({ - dsn: process.env.VUE_APP_SENTRY_DSN, - enabled: true, - beforeSend: (ev) => { - if (!enabledReporting) return null; - return ev; - }, - }); - else logger.child("Sentry").warn("Sentry is not enabled"); -} +if (process.env.VUE_APP_SENTRY_DSN) { + Sentry.init({ + dsn: process.env.VUE_APP_SENTRY_DSN, + enabled: true, + beforeSend: (ev) => { + if (!enabledReporting) return null; + return ev; + }, + }) + logger.child("Sentry").info("Sentry has been initialized"); +} else logger.child("Sentry").warn("Sentry is not enabled");