mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-09 21:07:46 +00:00
fix: dont send errors in dev mode
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { SENTRY_DSN } from "$lib/constants";
|
||||
import { handleErrorWithSentry, replayIntegration } from "@sentry/sveltekit";
|
||||
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: !dev,
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: 1.0,
|
||||
|
||||
@@ -15,7 +17,7 @@ Sentry.init({
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
|
||||
// If you don't want to use Session Replay, just remove the line below:
|
||||
integrations: [replayIntegration()],
|
||||
integrations: [replayIntegration()]
|
||||
});
|
||||
|
||||
// If you have a custom error handler, pass it to `handleErrorWithSentry`
|
||||
|
||||
@@ -3,8 +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 { dev } from '$app/environment';
|
||||
|
||||
Sentry.init({
|
||||
enabled: !dev,
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: 1
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user