diff --git a/.gitignore b/.gitignore index 930bd54..d108505 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ vite.config.ts.timestamp-* .vercel # Sentry Config File .sentryclirc + +# Sentry Config File +.sentryclirc diff --git a/src/hooks.client.ts b/src/hooks.client.ts index 06c8edc..c44a8c6 100644 --- a/src/hooks.client.ts +++ b/src/hooks.client.ts @@ -1,24 +1,24 @@ - // This file is used to initialize Sentry on the client side. import { dev } from '$app/environment'; import * as Sentry from '@sentry/sveltekit'; - Sentry.init({ - dsn: 'https://6b2d8c5156a83705bc7ffb4f0d16ba5f@sentry.plygrnd.org/2', + environment: dev ? 'development' : 'production', - tracesSampleRate: 1.0, + dsn: 'https://132cfeda18443f305824133b96e8bc0e@sentry.plygrnd.org/2', - // This sets the sample rate to be 10%. You may want this to be 100% while - // in development and sample at a lower rate in production - replaysSessionSampleRate: dev ? 1.0 : 0.1, + tracesSampleRate: 1.0, - // If the entire session is not sampled, use the below sample rate to sample - // sessions when an error occurs. - replaysOnErrorSampleRate: 1.0, - - // If you don't want to use Session Replay, just remove the line below: - integrations: [new Sentry.Replay()], + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: dev ? 1.0 : 0.1, + + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + // If you don't want to use Session Replay, just remove the line below: + integrations: [new Sentry.Replay()] }); // If you have a custom error handler, pass it to `handleErrorWithSentry` diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 0d725dc..adf001e 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,12 +1,13 @@ -import { sequence } from "@sveltejs/kit/hooks"; -import { handleErrorWithSentry, sentryHandle } from "@sentry/sveltekit"; +import { sequence } from '@sveltejs/kit/hooks'; +import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit'; import * as Sentry from '@sentry/sveltekit'; +import { dev } from '$app/environment'; Sentry.init({ - dsn: 'https://6b2d8c5156a83705bc7ffb4f0d16ba5f@sentry.plygrnd.org/2', - tracesSampleRate: 1.0, - profilesSampleRate: 1.0, // Profiling sample rate is relative to tracesSampleRate - + environment: dev ? 'development' : 'production', + dsn: 'https://132cfeda18443f305824133b96e8bc0e@sentry.plygrnd.org/2', + tracesSampleRate: 1.0, + profilesSampleRate: 1.0 // Profiling sample rate is relative to tracesSampleRate }); // If you have custom handlers, make sure to place them after `sentryHandle()` in the `sequence` function. diff --git a/static/favicon.png b/static/favicon.ico similarity index 100% rename from static/favicon.png rename to static/favicon.ico