Skip to content

Commit

Permalink
fix: add indexer label to indexer_query duration metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed May 29, 2024
1 parent ec15614 commit e1f681c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions graph-gateway/src/client_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,12 @@ async fn handle_indexer_query_inner(
ctx.response_time = Instant::now() - start_time;

let deployment = selection.indexing.deployment.to_string();
with_metric(&METRICS.indexer_query.duration, &[&deployment], |hist| {
hist.observe(ctx.response_time.as_millis() as f64)
});
let indexer = format!("{:?}", selection.indexing.indexer);
with_metric(
&METRICS.indexer_query.duration,
&[&deployment, &indexer],
|hist| hist.observe(ctx.response_time.as_millis() as f64),
);

let response = result?;
if response.status != StatusCode::OK.as_u16() {
Expand Down

0 comments on commit e1f681c

Please sign in to comment.