mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 file changed
+6
-1
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import { CaptureConsole, Dedupe, Offline } from "@sentry/integrations";
|
import { CaptureConsole, Dedupe, Offline } from "@sentry/integrations";
|
||||||
import * as Sentry from "@sentry/electron";
|
import * as Sentry from "@sentry/electron";
|
||||||
import { sentryDsn, isProduction } from "./vars";
|
import { sentryDsn, sentryDsnIsValid, isProduction } from "./vars";
|
||||||
import { UserStore } from "./user-store";
|
import { UserStore } from "./user-store";
|
||||||
import logger from "../main/logger";
|
import logger from "../main/logger";
|
||||||
|
|
||||||
@@ -82,7 +82,12 @@ export function SentryInit() {
|
|||||||
environment: isProduction ? "production" : "development",
|
environment: isProduction ? "production" : "development",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (sentryDsnIsValid) {
|
||||||
logger.info(`✔️ [SENTRY-INIT]: Sentry for ${processName} is initialized.`);
|
logger.info(`✔️ [SENTRY-INIT]: Sentry for ${processName} is initialized.`);
|
||||||
|
} else {
|
||||||
|
logger.info(`⚠️ [SENTRY-INIT]: Sentry for ${processName} is initialized but cant transport exceptions because dsn is not valid`);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.warn(`⚠️ [SENTRY-INIT]: Sentry.init() error: ${error?.message ?? error}.`);
|
logger.warn(`⚠️ [SENTRY-INIT]: Sentry.init() error: ${error?.message ?? error}.`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user