Enable session replays on error

This commit is contained in:
Jade Ellis
2024-08-27 18:55:44 +01:00
parent 8fbab1f87c
commit 0be4f5f0c6
+3 -3
View File
@@ -1,4 +1,4 @@
import { init as initSentry, handleErrorWithSentry, makeBrowserOfflineTransport, makeFetchTransport } from '@sentry/sveltekit';
import { init as initSentry, handleErrorWithSentry, makeBrowserOfflineTransport, makeFetchTransport, replayIntegration } from '@sentry/sveltekit';
initSentry({
dsn: import.meta.env.SENTRY_DSN,
@@ -7,14 +7,14 @@ initSentry({
// 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: 0.1,
replaysSessionSampleRate: 0.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: [replayIntegration()],
integrations: [replayIntegration()],
// To enable offline events caching, use makeBrowserOfflineTransport to wrap
// existing transports and queue events using the browsers' IndexedDB storage