Skip to content

Commit

Permalink
fix: remove name label from QUERY_DURATION metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Sep 29, 2023
1 parent 256831d commit 43f1a1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions service/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pub static QUERIES_WITHOUT_RECEIPT: Lazy<IntCounterVec> = Lazy::new(|| {
m
});

#[allow(dead_code)]
pub static QUERY_DURATION: Lazy<HistogramVec> = Lazy::new(|| {
let m = HistogramVec::new(
HistogramOpts::new(
Expand All @@ -90,7 +89,7 @@ pub static QUERY_DURATION: Lazy<HistogramVec> = 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");
Expand Down
2 changes: 1 addition & 1 deletion service/src/server/routes/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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
Expand Down

0 comments on commit 43f1a1c

Please sign in to comment.