From 70487e8ed9e1a0c9755c007787ae5424b82cc569 Mon Sep 17 00:00:00 2001 From: Brian Martin Date: Fri, 16 Feb 2024 16:02:01 -0800 Subject: [PATCH] filter out the atomic histograms again --- src/exposition/http.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/exposition/http.rs b/src/exposition/http.rs index 62a26caa..c94af981 100644 --- a/src/exposition/http.rs +++ b/src/exposition/http.rs @@ -259,7 +259,17 @@ mod handlers { pub async fn msgpack() -> Result { let snapshot = SnapshotterBuilder::new() - .filter(|metric| !metric.name().starts_with("log_")) + .filter(|metric| { + if let Some(m) = metric.as_any() { + if m.downcast_ref::().is_some() { + false + } else { + !metric.name().starts_with("log_") + } + } else { + false + } + }) .build() .snapshot();