Skip to content

Commit e1f681c

Browse files
committed
fix: add indexer label to indexer_query duration metric
1 parent ec15614 commit e1f681c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

graph-gateway/src/client_query.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,12 @@ async fn handle_indexer_query_inner(
697697
ctx.response_time = Instant::now() - start_time;
698698

699699
let deployment = selection.indexing.deployment.to_string();
700-
with_metric(&METRICS.indexer_query.duration, &[&deployment], |hist| {
701-
hist.observe(ctx.response_time.as_millis() as f64)
702-
});
700+
let indexer = format!("{:?}", selection.indexing.indexer);
701+
with_metric(
702+
&METRICS.indexer_query.duration,
703+
&[&deployment, &indexer],
704+
|hist| hist.observe(ctx.response_time.as_millis() as f64),
705+
);
703706

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

0 commit comments

Comments
 (0)