feat(CF-2136): Add Sentry structured logging support

Enable enableLogs + beforeSendLog in Sentry.init, add log helpers where
applicable. Bump @sentry/node to ^10.39.0 for Sentry.logger API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-03-04 10:38:48 +02:00
parent a6fcf2cefa
commit 8b9ff93cfb
3 changed files with 2665 additions and 2 deletions

View File

@@ -19,6 +19,11 @@ if (process.env.SENTRY_DSN) {
dsn: process.env.SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT || "production",
tracesSampleRate: parseFloat(process.env.SENTRY_API_TRACE_RATE || "0.1"),
enableLogs: true,
beforeSendLog(log) {
if (log.level === "debug") return null;
return log;
},
});
}