diff --git a/.env.example b/.env.example index 02cde089..3de6f04b 100644 --- a/.env.example +++ b/.env.example @@ -7,5 +7,7 @@ VITE_APP_SEMESTER= VITE_APP_SITE_TITLE= VITE_APP_BACKEND_URL= +VITE_APP_SENTRY_DSN=https://01f0882e6aa029a125426e4ad32e6c18@o553498.ingest.us.sentry.io/4507775325437952 +VITE_APP_SENTRY_TRACING=0 # To upload source maps to Sentry (Optional) -SENTRY_AUTH_TOKEN= +VITE_APP_SENTRY_AUTH_TOKEN= diff --git a/src/App.tsx b/src/App.tsx index 8c511a0b..afd77e2b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,17 +36,17 @@ const App = () => { // Enable Error Tracking, Performance Monitoring and Session Replay Sentry.init({ environment: Number(import.meta.env.VITE_APP_PROD) ? "production" : "development", - dsn: "https://01f0882e6aa029a125426e4ad32e6c18@o553498.ingest.us.sentry.io/4507775325437952", + dsn: import.meta.env.VITE_APP_SENTRY_DSN, integrations: [ - Sentry.browserTracingIntegration(), - Sentry.replayIntegration(), - Sentry.reactRouterV6BrowserTracingIntegration({ + import.meta.env.VITE_APP_SENTRY_TRACING ? Sentry.browserTracingIntegration() : null, + import.meta.env.VITE_APP_SENTRY_TRACING ? Sentry.replayIntegration() : null, + import.meta.env.VITE_APP_SENTRY_TRACING ? Sentry.reactRouterV6BrowserTracingIntegration({ useEffect: React.useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutes, - }), + }) : null, ], // Performance monitoring @@ -71,7 +71,7 @@ const App = () => {
- +
}