instrumentation.ts13 lines · main
1import * as Sentry from '@sentry/nextjs'
2
3export async function register() {
4 if (process.env.NEXT_RUNTIME === 'nodejs') {
5 await import('./sentry.server.config')
6 }
7
8 if (process.env.NEXT_RUNTIME === 'edge') {
9 await import('./sentry.edge.config')
10 }
11}
12
13export const onRequestError = Sentry.captureRequestError