Skip to content

Commit 8ca8fad

Browse files
committed
feat(sentry): set up sampling and replays
1 parent 4ec22d7 commit 8ca8fad

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sentry.client.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,20 @@ Sentry.init({
44
// There isn't any way to get the dsn from env var here
55
environment: useRuntimeConfig().public.sentry.environment,
66
dsn: useRuntimeConfig().public.sentry.dsn,
7+
// This sets the sample rate to be 10%. You may want this to be 100% while
8+
// in development and sample at a lower rate in production
9+
replaysSessionSampleRate: 0.1,
10+
11+
// If the entire session is not sampled, use the below sample rate to sample
12+
// sessions when an error occurs.
13+
replaysOnErrorSampleRate: 1.0,
14+
15+
integrations: [
16+
Sentry.replayIntegration({
17+
// Additional SDK configuration goes in here, for example:
18+
maskAllText: true,
19+
blockAllMedia: true,
20+
}),
21+
Sentry.browserTracingIntegration(),
22+
],
723
})

0 commit comments

Comments
 (0)