-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathinstrumentation-client.ts
More file actions
20 lines (18 loc) · 1006 Bytes
/
instrumentation-client.ts
File metadata and controls
20 lines (18 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { captureRouterTransitionStart, init } from '@sentry/nextjs';
if (process.env.NODE_ENV !== 'development') {
init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,
normalizeDepth: 5,
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 0.05,
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
});
}
// This export will instrument router navigations, and is only relevant if you enable tracing.
// `captureRouterTransitionStart` is available from SDK version 9.12.0 onwards
export const onRouterTransitionStart = captureRouterTransitionStart;