diff --git a/client/src/index.tsx b/client/src/index.tsx index b37f9f7..bdf1e9e 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -23,7 +23,6 @@ getConfig().then(({ data }) => { Sentry.init({ dsn: data.sentry.dsn, environment: data.sentry.environment, - enableLogs: true, }); } }).catch(() => { /* config endpoint nedostupný — běžíme bez Sentry */ }); diff --git a/server/.env.template b/server/.env.template index 767efc9..57cc1b3 100644 --- a/server/.env.template +++ b/server/.env.template @@ -58,7 +58,7 @@ # BOLT_POLL_INTERVAL_MS=3000 # Sentry (volitelné) — když není vyplněno, Sentry se vůbec neaktivuje. -# Server hlásí chyby (5xx, pády) a přeposílá console logy jako Sentry Logs. +# Server hlásí chyby (5xx, pády, console.error/warn); console.log se k chybám přikládá jako breadcrumbs. # SENTRY_DSN=https://...@sentry.example.com/1 # DSN pro prohlížeč (klient si ho vyzvedne z GET /api/config). Když není vyplněno, použije se SENTRY_DSN. # SENTRY_CLIENT_DSN=https://...@sentry.example.com/2 diff --git a/server/src/instrument.ts b/server/src/instrument.ts index e6a13b9..0bf22ae 100644 --- a/server/src/instrument.ts +++ b/server/src/instrument.ts @@ -11,9 +11,10 @@ if (process.env.SENTRY_DSN) { Sentry.init({ dsn: process.env.SENTRY_DSN, environment: process.env.NODE_ENV ?? 'production', - enableLogs: true, - // Přeposílá console.log/warn/error jako Sentry Logs — mj. přechody stavů Bolt trackingu - integrations: [Sentry.consoleLoggingIntegration({ levels: ['log', 'warn', 'error'] })], + // Naše self-hosted instance má jen error monitoring (bez Sentry Logs): + // console.error/warn se hlásí jako eventy, console.log (např. přechody stavů + // Bolt trackingu) se k chybám přikládá jako breadcrumbs (výchozí integrace). + integrations: [Sentry.captureConsoleIntegration({ levels: ['error', 'warn'] })], }); console.log('Sentry: inicializováno'); }