feat: add sentry bug reporting

This commit is contained in:
Vasily Zubarev
2025-04-08 20:56:23 +02:00
parent ec72b45ed8
commit b47dc4b80a
10 changed files with 3090 additions and 164 deletions

13
instrumentation.ts Normal file
View File

@@ -0,0 +1,13 @@
import * as Sentry from '@sentry/nextjs';
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config');
}
if (process.env.NEXT_RUNTIME === 'edge') {
await import('./sentry.edge.config');
}
}
export const onRequestError = Sentry.captureRequestError;