mirror of
https://github.com/bitbaum/petvity.git
synced 2026-12-05 16:48:23 +01:00
No-ops until NEXT_PUBLIC_SENTRY_DSN is set. sendDefaultPii=false, traces 0.1, no replay. Build passes without DSN or auth token. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 lines
468 B
TypeScript
15 lines
468 B
TypeScript
// Next.js server startup hook — loads the runtime-appropriate Sentry init.
|
|
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");
|
|
}
|
|
}
|
|
|
|
// Reports errors from nested React Server Components to Sentry.
|
|
export const onRequestError = Sentry.captureRequestError;
|