diff --git a/src/hooks.client.ts b/src/hooks.client.ts index cfedfbfe1..dfc8de119 100644 --- a/src/hooks.client.ts +++ b/src/hooks.client.ts @@ -1,10 +1,10 @@ -import { building } from '$app/environment'; +import { dev } from '$app/environment'; import { SENTRY_DSN } from '$lib/constants'; import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit'; import * as Sentry from '@sentry/sveltekit'; Sentry.init({ - enabled: building, + enabled: !dev, dsn: SENTRY_DSN, tracesSampleRate: 1.0, diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 85d93acc4..8d671be05 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -3,10 +3,10 @@ import type { Handle } from '@sveltejs/kit'; import redirects from './redirects.json'; import { sequence } from '@sveltejs/kit/hooks'; import { BANNER_KEY, SENTRY_DSN } from '$lib/constants'; -import { building } from '$app/environment'; +import { dev } from '$app/environment'; Sentry.init({ - enabled: building, + enabled: !dev, dsn: SENTRY_DSN, tracesSampleRate: 1 })