-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstrumentation-client.ts
More file actions
29 lines (27 loc) · 870 Bytes
/
instrumentation-client.ts
File metadata and controls
29 lines (27 loc) · 870 Bytes
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"
import {
sentryBeforeBreadcrumb,
sentryBeforeSend,
sentryBeforeSendSpan,
} from "./lib/observability/sentry-scrubbing"
import { sentryTracesSampler } from "./lib/observability/sentry-tracing"
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT ?? process.env.NODE_ENV,
release: process.env.SENTRY_RELEASE,
sendDefaultPii: false,
tracesSampler: sentryTracesSampler,
beforeSend: sentryBeforeSend,
beforeSendSpan: sentryBeforeSendSpan,
beforeBreadcrumb: sentryBeforeBreadcrumb,
integrations: [
Sentry.replayIntegration({
maskAllText: true,
maskAllInputs: true,
blockAllMedia: true,
}),
],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1,
})
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart