Skip to content

fix(obs): init_telemetry installs an EnvFilter (RUST_LOG, default info)#240

Merged
jrosskopf merged 1 commit into
mainfrom
fix/telemetry-env-filter
Jul 4, 2026
Merged

fix(obs): init_telemetry installs an EnvFilter (RUST_LOG, default info)#240
jrosskopf merged 1 commit into
mainfrom
fix/telemetry-env-filter

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

init_telemetry installed no level filter: every process embedding the gateway (a consumer demo, an application's test harness, the escurel binary itself) was flooded with hyper/reqwest TRACE lines, and RUST_LOG was silently ignored. The datazoo-agent-template had to claim the global subscriber first as a workaround (template #76).

The filter is now RUST_LOG when set (unparseable directives fall back to info rather than panicking at boot), else info. json_log_layer stays unfiltered — test subscribers compose their own.

Test plan

  • escurel-server/tests/telemetry_filter.rs — own test process, real in-process gateway install, red first with the exact defect: LevelFilter::current() was TRACE, now INFO; trace events disabled, info events enabled.
  • escurel-obs unit tests over the filter derivation (default / RUST_LOG passthrough / blank + unparseable fallbacks, asserted via EnvFilter's Display).
  • Full gate green locally: fmt --check, clippy --workspace --all-targets -D warnings, workspace tests 0 failures, release build.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

init_telemetry installed NO level filter: every process embedding the
gateway (a consumer demo, an application's test harness, the escurel
binary itself) was flooded with hyper/reqwest TRACE lines, and RUST_LOG
was silently ignored. Downstream (datazoo-agent-template) had to claim
the global subscriber first as a workaround.

The filter is RUST_LOG when set (unparseable directives fall back to
info rather than panicking at boot), else info. json_log_layer stays
unfiltered — test subscribers compose their own.

Test plan: escurel-server/tests/telemetry_filter.rs (own process, real
in-process gateway install; red first with the exact defect —
LevelFilter::current() was TRACE, now INFO, trace events disabled) +
escurel-obs unit tests over the filter derivation (default, RUST_LOG
passthrough, blank/unparseable fallbacks). Gate: fmt, clippy -D
warnings, workspace tests 0 failures, release build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jrosskopf jrosskopf merged commit 9bafd07 into main Jul 4, 2026
@jrosskopf jrosskopf deleted the fix/telemetry-env-filter branch July 4, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant