-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstrumentation.ts
31 lines (24 loc) · 1.07 KB
/
instrumentation.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
import * as Sentry from '@sentry/nextjs'
export const onRequestError = Sentry.captureRequestError
export function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
Sentry.init({
dsn: 'https://a205584b48c84a7fbfcd3632479d33f7@o4505069644611584.ingest.sentry.io/4505069646643200',
enabled: process.env.NODE_ENV === 'production',
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
})
}
if (process.env.NEXT_RUNTIME === 'edge') {
Sentry.init({
dsn: 'https://a205584b48c84a7fbfcd3632479d33f7@o4505069644611584.ingest.sentry.io/4505069646643200',
enabled: process.env.NODE_ENV === 'production',
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
})
}
}