added sentry environment

This commit is contained in:
Luke Hagar
2024-02-07 11:49:25 -06:00
parent 0c43f3cdfe
commit fbe886df53
4 changed files with 23 additions and 19 deletions

3
.gitignore vendored
View File

@@ -11,3 +11,6 @@ vite.config.ts.timestamp-*
.vercel
# Sentry Config File
.sentryclirc
# Sentry Config File
.sentryclirc

View File

@@ -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,
// 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 you don't want to use Session Replay, just remove the line below:
integrations: [new Sentry.Replay()],
// 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`

View File

@@ -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.

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB