mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-10 08:05:22 +02:00
19 lines
543 B
TypeScript
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;
|