fix(telemetry): console logs to WARN+ while logs go out over OTLP #579

Merged
sharang merged 1 commits from fix/console-logs-with-otlp into main 2026-10-29 11:58:26 +00:00
Owner

P1 of the instrumentation plan.

Why

With OTLP on, every Prüfwerk log line arrives in SigNoz twice: the OTLP record (structured attributes, severity, trace context since #577) and the node otel-agent's copy of the container stdout (plain text, timestamp/level prefix, often no severity). Last 6 h: 285 vs 284 (stage), 135 vs 134 (prod). Dashboard panels with body CONTAINS (LLM triage:, CVE) counted twice; the stdout copy also carries the plain-text repo paths.

The existing alert and views (body LIKE 'scan failed:%', body = 'pipeline stage skipped') match only the OTLP copy, so nothing that reads Prüfwerk logs depends on the stdout copy.

What

While OTLP export is on, the console fmt layer filters with LOG_CONSOLE (default warn): warnings and errors stay on stdout as a fallback, INFO reaches SigNoz over OTLP only. Without OTLP nothing changes. LOG_CONSOLE=info restores the full console (e.g. for local debugging).

cargo fmt --check, clippy -D warnings (core, agent), telemetry tests green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4

P1 of the instrumentation plan. ## Why With OTLP on, every Prüfwerk log line arrives in SigNoz twice: the OTLP record (structured attributes, severity, trace context since #577) and the node otel-agent's copy of the container stdout (plain text, timestamp/level prefix, often no severity). Last 6 h: 285 vs 284 (stage), 135 vs 134 (prod). Dashboard panels with `body CONTAINS` (`LLM triage:`, `CVE`) counted twice; the stdout copy also carries the plain-text repo paths. The existing alert and views (`body LIKE 'scan failed:%'`, `body = 'pipeline stage skipped'`) match only the OTLP copy, so nothing that reads Prüfwerk logs depends on the stdout copy. ## What While OTLP export is on, the console `fmt` layer filters with `LOG_CONSOLE` (default `warn`): warnings and errors stay on stdout as a fallback, INFO reaches SigNoz over OTLP only. Without OTLP nothing changes. `LOG_CONSOLE=info` restores the full console (e.g. for local debugging). `cargo fmt --check`, clippy `-D warnings` (core, agent), telemetry tests green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
sharang added 1 commit 2026-10-29 11:43:23 +00:00
fix(telemetry): console logs to WARN+ while logs go out over OTLP
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 14m28s
3ae6b808d8
With OTLP export on, SigNoz got every Prüfwerk line twice: the OTLP
record (structured, severity, trace context) and the node agent's copy
of stdout (plain text, often without severity). The console layer now
filters with LOG_CONSOLE (default warn) in that mode; INFO reaches
SigNoz over OTLP only. Without OTLP the console is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
sharang merged commit 24001850ec into main 2026-10-29 11:58:26 +00:00
Sign in to join this conversation.