diff --git a/.env-example b/.env-example index 7a14d539b3..0103c4c11b 100644 --- a/.env-example +++ b/.env-example @@ -1,4 +1,4 @@ export REACT_APP_CLIENT_ID='' export REACT_APP_BACKEND_URL='' -export SENTRY_ENV='' -export SENTRY_DSN='' \ No newline at end of file +export REACT_APP_SENTRY_ENV='' +export REACT_APP_SENTRY_DSN='' \ No newline at end of file diff --git a/src/index.jsx b/src/index.jsx index de8eb288b7..fe2aa654be 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -6,17 +6,17 @@ import './styles/index.scss'; import 'sgds-govtech/css/sgds.css'; import App from './App'; -if (process.env.ENV !== 'staging' || process.env.ENV !== 'production') { - Sentry.init({ - dsn: process.env.SENTRY_DSN, - integrations: [ - new Integrations.BrowserTracing(), - ], - - // We recommend adjusting this value in production, or using tracesSampler - // for finer control - tracesSampleRate: 1.0, - }); +if (process.env.REACT_APP_SENTRY_ENV === 'staging' || process.env.REACT_APP_SENTRY_ENV == 'production') { + Sentry.init({ + dsn: process.env.REACT_APP_SENTRY_DSN, + integrations: [ + new Integrations.BrowserTracing(), + ], + + // We recommend adjusting this value in production, or using tracesSampler + // for finer control + tracesSampleRate: 1.0, + }); } ReactDOM.render(, document.getElementById('root'));