feat(otel): export logs through the tracing pipeline, correlated with traces (#147)
Logs were a separate pipeline: env_logger in debug (never exported) and opentelemetry-appender-log in release (exported without trace context, so SigNoz could not link logs to traces). - tracing-subscriber `tracing-log` feature: try_init installs LogTracer, so log:: records become tracing events: one console format, and RUST_LOG per-module directives still apply to them. - opentelemetry-appender-tracing exports events as OTel log records when OTLP_OTLS_ENDPOINT is set (any build), stamped with the enclosing span's trace_id/span_id. A per-layer filter drops the exporter's own crates. - The OTel span layer keeps only WARN/ERROR events as span events; the info/debug copies duplicated the correlated logs. - Remove env_logger init in the server, init_logs, and the unused opentelemetry-appender-log / opentelemetry-stdout deps. - tests/otel_log_correlation.rs pins correlation (native + bridged), the span-event filter, and per-module filtering of bridged records. - Constitution 1.2.0 (Principle V logging rule), CLAUDE.md, README, .env.example. Closes #147 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
79b339a2a6
commit
3b3e6bdb39
9 files changed
+284
-106
No files matched your search
+3
-2
@@ -32,8 +32,9 @@ HLS_TIMEOUT_SECONDS=900
|
||||
PLAYLIST_CLEANUP_INTERVAL_SECONDS=86400
|
||||
|
||||
# ── Telemetry ────────────────────────────────────────────────────────────
|
||||
# Span export over OTLP in any build when set (unset = spans stay local).
|
||||
# RUST_LOG also gates span export: keep it at info or debug.
|
||||
# Span + log export over OTLP in any build when set (unset = nothing
|
||||
# exported). Logs carry trace ids, so SigNoz links them to traces.
|
||||
# RUST_LOG also gates export: keep it at info or debug.
|
||||
# OTLP_OTLS_ENDPOINT=http://localhost:4317
|
||||
|
||||
# ── AI Insights — Ollama (local LLM) ────────────────────────────────────
|
||||
|
||||
Reference in new issue
Block a user