feat(observability): add sentry monitoring

This commit is contained in:
2026-06-23 11:42:33 +08:00
parent 6bcc070ba1
commit e21f2502a5
8 changed files with 1400 additions and 22 deletions
+13
View File
@@ -0,0 +1,13 @@
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;