Added Sentry.io

This commit is contained in:
Ahmad 2024-11-27 00:47:14 -05:00
parent 87a48c4fc7
commit 3554a03a2f
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
7 changed files with 1367 additions and 12 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;