fix: Sentry jen s error monitoringem (bez Sentry Logs)
CI / Generate TypeScript types (push) Successful in 11s
CI / Server unit tests (push) Successful in 23s
CI / Build server (push) Successful in 27s
CI / Build client (push) Successful in 40s
CI / Playwright E2E tests (push) Successful in 1m32s
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled
CI / Generate TypeScript types (push) Successful in 11s
CI / Server unit tests (push) Successful in 23s
CI / Build server (push) Successful in 27s
CI / Build client (push) Successful in 40s
CI / Playwright E2E tests (push) Successful in 1m32s
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled
Naše self-hosted instance nemá zapnuté Sentry Logs — console.error/warn se nově hlásí jako eventy (captureConsoleIntegration), console.log se k chybám přikládá jako breadcrumbs.
This commit is contained in:
@@ -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 */ });
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user