.env.example
782 Bytes
-
feat: 接入自部署 Sentry(前后端分开,错误+基础tracing) · 640ba3f9
自部署 Sentry 23.6.1(am.jwsmed.com),两个项目/DSN/SDK,环境用 SENTRY_ENVIRONMENT 区分(test/prod)。 已冒烟验证:老服务器接受现代 SDK v10 envelope(flush=true);pac-web next build(Turbopack)通过;pac-service 启动正常。 后端 pac-service(@sentry/nestjs): - src/instrument.ts:Sentry.init(DSN 缺省则 no-op),main.ts 首行 import;profiling 关。 - app.module 注册 SentryModule.forRoot()(请求级 tracing)。 - AllExceptionsFilter 仅对真·500(instanceof Error 分支)captureException,业务错误不上报。 前端 pac-web(@sentry/nextjs,Next16/App Router): - instrumentation-client.ts / sentry.server.config.ts / sentry.edge.config.ts / instrumentation.ts。 - next.config.mjs 用 withSentryConfig 包裹;sentryUrl 指自部署;source map 上传仅 SENTRY_AUTH_TOKEN 存在时(secret,不入库);telemetry 关;不开 Replay。 env:两端 .env.example 补 Sentry 段;DSN 走 env,真值在各机 .env(gitignored),auth token 仅构建期 env。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
luoqi committed