Docs: RUST_LOG also gates span export (#135)
The subscriber's single EnvFilter fronts both the console and the OTel layer, so RUST_LOG decides which spans exist for export. Documented in CLAUDE.md (supported range info/debug) and at the filter in init_tracing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f510940819
commit
517d1d4b62
2 files changed
+14
-1
No files matched your search
@@ -55,6 +55,9 @@ pub fn init_tracing() {
|
||||
let tracer = tracer_provider.tracer("image-server");
|
||||
global::set_tracer_provider(tracer_provider);
|
||||
|
||||
// One EnvFilter in front of BOTH layers: `RUST_LOG` also decides which
|
||||
// spans exist for export. All spans are `info`, so keep it at info/debug
|
||||
// (see CLAUDE.md "Tracing"); `warn` turns span export off.
|
||||
tracing_subscriber::registry()
|
||||
.with(
|
||||
tracing_subscriber::EnvFilter::try_from_default_env()
|
||||
|
||||
Reference in new issue
Block a user