fix(obs): init_telemetry installs an EnvFilter (RUST_LOG, default info)#240
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
init_telemetryinstalled 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, andRUST_LOGwas silently ignored. The datazoo-agent-template had to claim the global subscriber first as a workaround (template #76).The filter is now
RUST_LOGwhen set (unparseable directives fall back toinforather than panicking at boot), elseinfo.json_log_layerstays 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()wasTRACE, nowINFO; trace events disabled, info events enabled.escurel-obsunit tests over the filter derivation (default /RUST_LOGpassthrough / blank + unparseable fallbacks, asserted viaEnvFilter'sDisplay).fmt --check,clippy --workspace --all-targets -D warnings, workspace tests 0 failures, release build.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.