From a0f1b6c7572c988d0a1e7785940db85c4f7ba2b8 Mon Sep 17 00:00:00 2001 From: Leonid Beschastny Date: Tue, 16 Jan 2024 16:26:00 +0100 Subject: [PATCH] Fix telemetry spans collection --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9b9dacf..aed5f07 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -116,8 +116,9 @@ where .pretty() .with_line_number(true) .with_thread_names(true) + .with_timer(tracing_subscriber::fmt::time::uptime()) .with_span_events(FmtSpan::NEW | FmtSpan::CLOSE) - .with_timer(tracing_subscriber::fmt::time::uptime()), + .with_writer(std::io::stdout.with_max_level(log_level)), ) } else { Box::new( @@ -144,7 +145,7 @@ pub fn init_tracing_with_fallbacks( propagation::TextMapSplitPropagator::default(), ); - let level_filter: LevelFilter = max(log_level, tracing::Level::INFO).into(); + let level_filter: LevelFilter = max(log_level, tracing::Level::TRACE).into(); let subscriber = tracing_subscriber::registry() .with(level_filter) .with(build_logger_text(log_level));