📈 (analytics) Add Sentry for error tracker

This commit is contained in:
2025-09-06 22:21:01 +07:00
parent 3a780ae9e7
commit 9205909600
11 changed files with 812 additions and 4 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;