diff --git a/packages/react-dogfood/sentry.client.config.js b/packages/react-dogfood/sentry.client.config.js index aa48dd1b26..9cf1c0eba5 100644 --- a/packages/react-dogfood/sentry.client.config.js +++ b/packages/react-dogfood/sentry.client.config.js @@ -6,12 +6,18 @@ import * as Sentry from '@sentry/nextjs'; const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN; -Sentry.init({ - dsn: SENTRY_DSN, // ||'https://fe0b0bd8c3244e9fa3cb8e252f4a4ceb@o14368.ingest.sentry.io/4504044576374784', - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1.0, - // ... - // Note: if you want to override the automatic release value, do not set a - // `release` value here - use the environment variable `SENTRY_RELEASE`, so - // that it will also get attached to your source maps -}); +if (window.location.href.includes('no-trace')) { + console.log('Opting out from Sentry'); +} else { + console.log('Setting up Sentry'); + + Sentry.init({ + dsn: SENTRY_DSN, // ||'https://fe0b0bd8c3244e9fa3cb8e252f4a4ceb@o14368.ingest.sentry.io/4504044576374784', + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 1.0, + // ... + // Note: if you want to override the automatic release value, do not set a + // `release` value here - use the environment variable `SENTRY_RELEASE`, so + // that it will also get attached to your source maps + }); +}