diff --git a/www/sentry.client.config.ts b/www/sentry.client.config.ts index 2c8fb7ce..aff65bbd 100644 --- a/www/sentry.client.config.ts +++ b/www/sentry.client.config.ts @@ -4,18 +4,22 @@ import * as Sentry from "@sentry/nextjs"; -Sentry.init({ - dsn: "https://a6fb679d6e99e303bb2ea0e2d68bfe46@o1376440.ingest.sentry.io/4505634666577920", +const SENTRY_DSN = process.env.SENTRY_DSN; - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 0, +if (SENTRY_DSN) { + Sentry.init({ + dsn: SENTRY_DSN, - // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: false, + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 0, - replaysOnErrorSampleRate: 0.0, + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, - // This sets the sample rate to be 10%. You may want this to be 100% while - // in development and sample at a lower rate in production - replaysSessionSampleRate: 0.0, -}); + replaysOnErrorSampleRate: 0.0, + + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.0, + }); +} diff --git a/www/sentry.edge.config.ts b/www/sentry.edge.config.ts index 92c2b174..c0127472 100644 --- a/www/sentry.edge.config.ts +++ b/www/sentry.edge.config.ts @@ -5,12 +5,16 @@ import * as Sentry from "@sentry/nextjs"; -Sentry.init({ - dsn: "https://a6fb679d6e99e303bb2ea0e2d68bfe46@o1376440.ingest.sentry.io/4505634666577920", +const SENTRY_DSN = process.env.SENTRY_DSN; - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 0, +if (SENTRY_DSN) { + Sentry.init({ + dsn: SENTRY_DSN, - // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: false, -}); + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 0, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, + }); +} diff --git a/www/sentry.server.config.ts b/www/sentry.server.config.ts index 7d24e518..be9622fd 100644 --- a/www/sentry.server.config.ts +++ b/www/sentry.server.config.ts @@ -4,12 +4,16 @@ import * as Sentry from "@sentry/nextjs"; -Sentry.init({ - dsn: "https://a6fb679d6e99e303bb2ea0e2d68bfe46@o1376440.ingest.sentry.io/4505634666577920", +const SENTRY_DSN = process.env.SENTRY_DSN; - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 0, +if (SENTRY_DSN) { + Sentry.init({ + dsn: SENTRY_DSN, - // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: false, -}); + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 0, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, + }); +}