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 .vercel
# Sentry Config File # Sentry Config File
.sentryclirc .sentryclirc
# Sentry Config File
.sentryclirc

View File

@@ -1,11 +1,11 @@
// This file is used to initialize Sentry on the client side. // This file is used to initialize Sentry on the client side.
import { dev } from '$app/environment'; import { dev } from '$app/environment';
import * as Sentry from '@sentry/sveltekit'; import * as Sentry from '@sentry/sveltekit';
Sentry.init({ Sentry.init({
dsn: 'https://6b2d8c5156a83705bc7ffb4f0d16ba5f@sentry.plygrnd.org/2', environment: dev ? 'development' : 'production',
dsn: 'https://132cfeda18443f305824133b96e8bc0e@sentry.plygrnd.org/2',
tracesSampleRate: 1.0, tracesSampleRate: 1.0,
@@ -18,7 +18,7 @@ Sentry.init({
replaysOnErrorSampleRate: 1.0, replaysOnErrorSampleRate: 1.0,
// If you don't want to use Session Replay, just remove the line below: // If you don't want to use Session Replay, just remove the line below:
integrations: [new Sentry.Replay()], integrations: [new Sentry.Replay()]
}); });
// If you have a custom error handler, pass it to `handleErrorWithSentry` // If you have a custom error handler, pass it to `handleErrorWithSentry`

View File

@@ -1,12 +1,13 @@
import { sequence } from "@sveltejs/kit/hooks"; import { sequence } from '@sveltejs/kit/hooks';
import { handleErrorWithSentry, sentryHandle } from "@sentry/sveltekit"; import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit'; import * as Sentry from '@sentry/sveltekit';
import { dev } from '$app/environment';
Sentry.init({ Sentry.init({
dsn: 'https://6b2d8c5156a83705bc7ffb4f0d16ba5f@sentry.plygrnd.org/2', environment: dev ? 'development' : 'production',
dsn: 'https://132cfeda18443f305824133b96e8bc0e@sentry.plygrnd.org/2',
tracesSampleRate: 1.0, tracesSampleRate: 1.0,
profilesSampleRate: 1.0, // Profiling sample rate is relative to tracesSampleRate 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. // 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