mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-06 04:22:07 +00:00
fix: enable sentry only in build
This commit is contained in:
@@ -9,3 +9,4 @@ PUBLIC_GROWTH_ENDPOINT=
|
||||
APPWRITE_DB_INIT_ID=
|
||||
APPWRITE_COL_INIT_ID=
|
||||
APPWRITE_API_KEY_INIT=
|
||||
SENTRY_AUTH_TOKEN=
|
||||
@@ -1,10 +1,11 @@
|
||||
import { dev } from '$app/environment';
|
||||
import { building } from '$app/environment';
|
||||
import { SENTRY_AUTH_TOKEN } from '$env/static/private';
|
||||
import { SENTRY_DSN } from '$lib/constants';
|
||||
import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit';
|
||||
import * as Sentry from '@sentry/sveltekit';
|
||||
|
||||
Sentry.init({
|
||||
enabled: !dev,
|
||||
enabled: !!SENTRY_AUTH_TOKEN && building,
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: 1.0,
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ 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 { dev } from '$app/environment';
|
||||
import { SENTRY_AUTH_TOKEN } from '$env/static/private';
|
||||
import { building } from '$app/environment';
|
||||
|
||||
Sentry.init({
|
||||
enabled: !dev,
|
||||
enabled: !!SENTRY_AUTH_TOKEN && building,
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: 1
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user