Revert "feat(observability): add sentry monitoring"

This reverts commit e21f2502a5.
This commit is contained in:
2026-06-23 11:51:23 +08:00
parent e21f2502a5
commit c9d75b6fe6
8 changed files with 22 additions and 1400 deletions
-33
View File
@@ -1,33 +0,0 @@
// This file configures the initialization of Sentry on the client.
// The added config here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN;
if (dsn) {
Sentry.init({
dsn,
integrations: [Sentry.replayIntegration()],
tracesSampleRate: Number(
process.env.NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE ??
(process.env.NODE_ENV === "production" ? "0.1" : "1"),
),
enableLogs: true,
replaysSessionSampleRate: Number(
process.env.NEXT_PUBLIC_SENTRY_REPLAY_SAMPLE_RATE ?? "0.05",
),
replaysOnErrorSampleRate: Number(
process.env.NEXT_PUBLIC_SENTRY_REPLAY_ERROR_SAMPLE_RATE ?? "1",
),
// Chat content and auth data are sensitive; do not send default PII.
sendDefaultPii: false,
});
}
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
-13
View File
@@ -1,13 +0,0 @@
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;