Sentry is opt-in via DSN env vars; logger uses structured pino JSON in prod; badge uploads are normalized to GIF with sharp. Co-authored-by: Cursor <[email protected]>
13 lines
319 B
TypeScript
13 lines
319 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");
|
|
}
|
|
}
|
|
|
|
export const onRequestError = Sentry.captureRequestError;
|