From f851ff1facda3773233f89b3d3ebea3f68429442 Mon Sep 17 00:00:00 2001 From: hopeyen Date: Fri, 29 Sep 2023 08:57:45 -0700 Subject: [PATCH] fix: remove name label from QUERY_DURATION metrics --- service/src/metrics/mod.rs | 2 +- service/src/server/routes/status.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/src/metrics/mod.rs b/service/src/metrics/mod.rs index f98789394..283ef733f 100644 --- a/service/src/metrics/mod.rs +++ b/service/src/metrics/mod.rs @@ -90,7 +90,7 @@ pub static QUERY_DURATION: Lazy = Lazy::new(|| { .namespace("indexer") .subsystem("service") .buckets(linear_buckets(0.0, 1.0, 20).unwrap()), - &["deployment", "name"], + &["deployment"], ) .expect("Failed to create query_duration histograms"); prometheus::register(Box::new(m.clone())).expect("Failed to register query_duration counter"); diff --git a/service/src/server/routes/status.rs b/service/src/server/routes/status.rs index 2b2d5d7c3..a6490741d 100644 --- a/service/src/server/routes/status.rs +++ b/service/src/server/routes/status.rs @@ -40,7 +40,7 @@ pub async fn status_queries( // Read the requested query string let query_string = match String::from_utf8(body_bytes.to_vec()) { Ok(s) => s, - Err(e) => return bad_request_response(&e.to_string()), + Err(e) => bad_request_response(&e.to_string()), }; // filter supported root fields @@ -63,7 +63,7 @@ pub async fn status_queries( let response: reqwest::Response = match request.send().await { Ok(r) => r, - Err(e) => return bad_request_response(&e.to_string()), + Err(e) => bad_request_response(&e.to_string()), }; match response.text().await {