-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsentry.client.config.ts
29 lines (23 loc) · 942 Bytes
/
sentry.client.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import * as Sentry from '@sentry/nextjs';
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN || process.env.SENTRY_DSN, // To store dsn value in env variables and it is stored in 2 variables as on client side Nextjs needs env with prefix NEXT_PUBLIC
tracesSampleRate: 1, // To trace every event in production.
debug: false, // To have logs but in development environments.
replaysOnErrorSampleRate: 0.1, // To trace every session with error.
replaysSessionSampleRate: 0.1, // To trace 10% of sessions(without any error).
integrations: [
Sentry.browserTracingIntegration(),
// // Sentry replay integration configs to mask all text and block media in replays captured.
// new Sentry.replayIntegration({
// maskAllText: true,
// blockAllMedia: true,
// }),
],
});
if (process.env.NODE_ENV === 'development') {
import('@spotlightjs/spotlight').then((Spotlight) => {
Spotlight.init({
debug: false,
});
});
}