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 -1
View File
@@ -1,3 +1,4 @@
import { withSentryConfig } from "@sentry/nextjs";
import type { NextConfig } from "next";
import { withSerwist } from "@serwist/turbopack";
@@ -36,4 +37,15 @@ const nextConfig: NextConfig = {
},
};
export default withSerwist(nextConfig);
export default withSentryConfig(withSerwist(nextConfig), {
org: process.env.SENTRY_ORG ?? "shenzhen-banlv-zhidao-technolo",
project: process.env.SENTRY_PROJECT ?? "javascript-nextjs",
silent: !process.env.CI,
widenClientFileUpload: true,
webpack: {
automaticVercelMonitors: true,
treeshake: {
removeDebugLogging: true,
},
},
});