diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts index 2e7efca8..91e2a271 100644 --- a/sentry.edge.config.ts +++ b/sentry.edge.config.ts @@ -8,6 +8,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "https://9c2eb3b4441745efad28a908001c30bf@o4510673866063872.ingest.de.sentry.io/4510673871306832", + // Disable Sentry in development + enabled: process.env.NODE_ENV === "production", + // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. tracesSampleRate: 1, diff --git a/sentry.server.config.ts b/sentry.server.config.ts index ba54ee8c..43bc9ec3 100644 --- a/sentry.server.config.ts +++ b/sentry.server.config.ts @@ -7,6 +7,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "https://9c2eb3b4441745efad28a908001c30bf@o4510673866063872.ingest.de.sentry.io/4510673871306832", + // Disable Sentry in development + enabled: process.env.NODE_ENV === "production", + // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. tracesSampleRate: 1, diff --git a/src/instrumentation-client.ts b/src/instrumentation-client.ts index 5d5c1d8e..4894f6ec 100644 --- a/src/instrumentation-client.ts +++ b/src/instrumentation-client.ts @@ -7,6 +7,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "https://9c2eb3b4441745efad28a908001c30bf@o4510673866063872.ingest.de.sentry.io/4510673871306832", + // Disable Sentry in development + enabled: process.env.NODE_ENV === "production", + // Add optional integrations for additional features integrations: [Sentry.replayIntegration()],