-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsentry.client.config.ts
33 lines (29 loc) · 1 KB
/
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
30
31
32
33
import * as Sentry from '@sentry/nextjs';
import { beforeSend, dsn, environment, release } from '@ad/src/utils/sentry';
const hasReplays = true;
const integrations: any[] = [];
if (hasReplays) {
integrations.push(
Sentry.replayIntegration({
// Browse the app and force a manual error to be able to check the rrweb record.
// You may find some elements not hidden and need to use `data-sentry-block` or `data-sentry-mask`
// Note: the class is the only way for us to target Crisp client to keep conversations private
maskAllInputs: true,
block: ['[data-sentry-block]', '.crisp-client'],
mask: ['[data-sentry-mask]', '.crisp-client'],
})
);
}
Sentry.init({
dsn: dsn,
environment: environment,
debug: false,
release: release,
autoSessionTracking: true,
integrations,
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
transport: Sentry.makeBrowserOfflineTransport(Sentry.makeFetchTransport),
transportOptions: {},
beforeSend: beforeSend,
});