-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsentry.config.ts
More file actions
30 lines (27 loc) · 1.02 KB
/
sentry.config.ts
File metadata and controls
30 lines (27 loc) · 1.02 KB
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
import * as Sentry from '@sentry/nextjs';
const { NODE_ENV } = process.env;
export const init = () =>
Sentry.init({
// Should add your own dsn
dsn: 'https://0bb207e6cd9e9174a0bcdfe3d48699aa@o4507576884658176.ingest.us.sentry.io/4507576887410688',
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 0.1,
integrations: [Sentry.replayIntegration()],
// ...
// 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
// Replay may only be enabled for the client-side
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
autoSessionTracking: true,
beforeSend(event) {
if (NODE_ENV === 'development') {
return null;
}
return event;
},
});