diff --git a/apps/studio/instrumentation-client.ts b/apps/studio/instrumentation-client.ts index 82cc2a026e1..9bd34e8177f 100644 --- a/apps/studio/instrumentation-client.ts +++ b/apps/studio/instrumentation-client.ts @@ -52,6 +52,9 @@ function isThirdPartyError(frames: Sentry.StackFrame[] | undefined) { Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, + ...(process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT && { + environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT, + }), // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, // [Ali] Filter out browser extensions and user scripts (FE-2094) diff --git a/apps/studio/sentry.edge.config.ts b/apps/studio/sentry.edge.config.ts index 1e69c24525d..c5db7e27ad9 100644 --- a/apps/studio/sentry.edge.config.ts +++ b/apps/studio/sentry.edge.config.ts @@ -7,6 +7,9 @@ import * as Sentry from '@sentry/nextjs' Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, + ...(process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT && { + environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT, + }), // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, }) diff --git a/apps/studio/sentry.server.config.ts b/apps/studio/sentry.server.config.ts index fd089fb1ff0..dba6457bc5f 100644 --- a/apps/studio/sentry.server.config.ts +++ b/apps/studio/sentry.server.config.ts @@ -6,6 +6,9 @@ import * as Sentry from '@sentry/nextjs' Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, + ...(process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT && { + environment: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT, + }), // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, ignoreErrors: [