tasko/instrumentation.ts

14 lines
326 B
TypeScript
Raw Permalink Normal View History

2024-11-27 05:47:14 +00:00
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;