Skip to content

Commit

Permalink
chore: sentry disabled by default in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspalma committed Oct 17, 2024
1 parent 9a13f45 commit 3fb09df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ VITE_APP_SEMESTER=
VITE_APP_SITE_TITLE=
VITE_APP_BACKEND_URL=

VITE_APP_SENTRY_DSN=https://[email protected]/4507775325437952
VITE_APP_SENTRY_TRACING=0
# To upload source maps to Sentry (Optional)
SENTRY_AUTH_TOKEN=
VITE_APP_SENTRY_AUTH_TOKEN=
12 changes: 6 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/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
Expand All @@ -71,7 +71,7 @@ const App = () => {
<Layout location={page.location} title={page.location} liquid={page.liquid}>
<div>
<page.element />
<Toaster/>
<Toaster />
</div>
</Layout>
}
Expand Down

0 comments on commit 3fb09df

Please sign in to comment.