feat: adding sentry to renderer

This commit is contained in:
Chubby Granny Chaser 2024-12-31 04:44:05 +00:00
parent ba2ac1eb93
commit 726c753568
No known key found for this signature in database
9 changed files with 512 additions and 34 deletions

View file

@ -34,6 +34,19 @@ const Achievements = React.lazy(
() => import("./pages/achievements/achievements")
);
import * as Sentry from "@sentry/react";
Sentry.init({
dsn: import.meta.env.RENDERER_VITE_SENTRY_DSN,
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});
console.log = logger.log;
const isStaging = await window.electron.isStaging();

View file

@ -3,6 +3,7 @@
interface ImportMetaEnv {
readonly RENDERER_VITE_EXTERNAL_RESOURCES_URL: string;
readonly RENDERER_VITE_SENTRY_DSN: string;
}
interface ImportMeta {