dograh/ui/src/instrumentation.ts
Abhishek Kumar 4f2a629340 Initial Commit 🚀 🚀
2025-09-09 14:37:32 +05:30

19 lines
543 B
TypeScript

import * as Sentry from '@sentry/nextjs';
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
// Enable source map support for better stack traces
if (process.env.NODE_ENV === 'development') {
const sourceMapSupport = await import('source-map-support');
sourceMapSupport.install();
}
await import('../sentry.server.config');
}
if (process.env.NEXT_RUNTIME === 'edge') {
await import('../sentry.edge.config');
}
}
export const onRequestError = Sentry.captureRequestError;