From da1f3fe952401daf28c2a678e817528d54c3ef4e Mon Sep 17 00:00:00 2001 From: jason5ng32 Date: Thu, 22 Oct 2026 11:37:55 +0800 Subject: [PATCH] Improvements Co-Authored-By: Claude Fable 5.1 --- sentry-instrument.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sentry-instrument.js b/sentry-instrument.js index 06abf8f9..bd81b24c 100644 --- a/sentry-instrument.js +++ b/sentry-instrument.js @@ -23,11 +23,17 @@ if (process.env.SENTRY_DSN_BACKEND && process.env.SENTRY_ENVIRONMENT !== 'develo environment: process.env.SENTRY_ENVIRONMENT || 'production', // 100% trace sampling (per-route latency / throughput / error rate under Insights) tracesSampleRate: 1.0, - // Sentry Logs — receives warn/error/fatal lines forwarded by the - // logMethod hook in server/logger.js - enableLogs: true, - // Never attach caller IPs / headers to events (privacy tool) - sendDefaultPii: false, + // Sentry Logs need no switch: the logMethod hook in server/logger.js + // forwards warn/error/fatal lines on its own. + // Never attach caller IPs, headers, cookies or bodies to events + // (privacy tool). The SDK collects all of them unless each category + // is switched off here; query strings stay and are redacted below. + dataCollection: { + userInfo: false, + cookies: false, + httpHeaders: false, + httpBodies: [], + }, // Upstream query strings carry API keys — redact those params in // breadcrumbs, spans, and request contexts (the rest of the query // stays: it's debugging context).