mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 21:35:25 +00:00
18 lines
439 B
TypeScript
18 lines
439 B
TypeScript
|
|
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');
|
||
|
|
}
|
||
|
|
|
||
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||
|
|
await import ('./initialize');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export const onRequestError = Sentry.captureRequestError;
|