Files
klz-cables.com/instrumentation.ts
Marc Mintel b05a21350c
Some checks failed
Build & Deploy / deploy (push) Failing after 3m45s
umami, glitchtip, redis
2026-01-18 15:37:51 +01:00

18 lines
515 B
TypeScript

import * as Sentry from '@sentry/nextjs';
// Next.js will call this on boot for the active runtime.
// We dynamically import the correct Sentry config file.
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');
}
}
// Capture errors from Server Components, middleware and route handlers.
export const onRequestError = Sentry.captureRequestError;