mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-25 08:48:13 +02:00
20 lines
543 B
TypeScript
20 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;
|