infra: hook up sentry

This commit is contained in:
talksik
2026-04-25 12:43:30 -07:00
parent 1e7a14d703
commit 1c3b4447cf
3 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ type AppConfig = {
orionUrl: string;
pusherUrl: string;
firebase: FirebaseConfig;
/** Empty string disables Sentry. Populate per-env when ready to ship. */
/** Empty string disables Sentry. Same DSN across envs; events are split by `environment` tag. */
sentryDsn: string;
};
@@ -39,7 +39,7 @@ const configs: Record<"dev" | "prod", AppConfig> = {
projectId: "flowy-dev-440017",
storageBucket: "flowy-dev-440017.firebasestorage.app",
},
sentryDsn: "",
sentryDsn: "https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
},
prod: {
orionUrl: "https://orion.flowy.live",
@@ -52,7 +52,7 @@ const configs: Record<"dev" | "prod", AppConfig> = {
projectId: "flowy-prod-440017",
storageBucket: "flowy-prod-440017.firebasestorage.app",
},
sentryDsn: "",
sentryDsn: "https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
},
};
+2 -1
View File
@@ -1,5 +1,5 @@
import * as Sentry from "@sentry/electron/renderer";
import { appConfig } from "@/config/env";
import { appConfig, appEnv } from "@/config/env";
import { installErrorSinks } from "@/lib/errors";
/**
@@ -11,6 +11,7 @@ export function initSentryRenderer(): void {
Sentry.init({
dsn: appConfig.sentryDsn,
environment: appEnv,
tracesSampleRate: 0,
});
+2 -1
View File
@@ -1,6 +1,6 @@
import { app } from "electron";
import * as Sentry from "@sentry/electron/main";
import { appConfig } from "@/config/env";
import { appConfig, appEnv } from "@/config/env";
import { installErrorSinks } from "@/lib/errors";
/**
@@ -12,6 +12,7 @@ export function initSentryMain(): void {
Sentry.init({
dsn: appConfig.sentryDsn,
environment: appEnv,
tracesSampleRate: 0,
release: app.getVersion(),
});