From 3695f57d84f3ca575a81ebc8a59acb86f4ff405c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 19 Oct 2024 22:04:59 +0200 Subject: feat(tvix/tracing): filter indicatif.pb_show fields in all cases Change-Id: I688cec79cefeae340872945c35743fae892cd053 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12688 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: yuka Reviewed-by: flokli --- tvix/tracing/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tvix/tracing/src/lib.rs b/tvix/tracing/src/lib.rs index 7d5ab56f55ed..05a3468b93b8 100644 --- a/tvix/tracing/src/lib.rs +++ b/tvix/tracing/src/lib.rs @@ -2,7 +2,9 @@ use indicatif::ProgressStyle; use std::sync::LazyLock; use tokio::sync::{mpsc, oneshot}; use tracing::Level; -use tracing_indicatif::{filter::IndicatifFilter, writer, IndicatifLayer, IndicatifWriter}; +use tracing_indicatif::{ + filter::IndicatifFilter, util::FilteredFormatFields, writer, IndicatifLayer, IndicatifWriter, +}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer}; #[cfg(feature = "otlp")] @@ -205,6 +207,10 @@ impl TracingBuilder { ) .with( tracing_subscriber::fmt::Layer::new() + .fmt_fields(FilteredFormatFields::new( + tracing_subscriber::fmt::format::DefaultFields::new(), + |field| field.name() != "indicatif.pb_show", + )) .with_writer(indicatif_layer.get_stderr_writer()) .compact(), ) -- cgit 1.4.1