Skip to content

Commit

Permalink
fix: Progressive override - use .operations instead of .schema fo…
Browse files Browse the repository at this point in the history
…r operations-related metrics (#4578)

These were accidentally named under the impression that they were
tracking schema-related config rather than operation-based behavior.

Co-authored-by: Geoffroy Couprie <[email protected]>
  • Loading branch information
trevor-scheer and Geal authored Feb 5, 2024
1 parent 823073d commit 2b628d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apollo-router/src/plugins/progressive_override/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl Plugin for ProgressiveOverridePlugin {

if !relevant_labels.is_empty() {
u64_counter!(
"apollo.router.schema.override.query",
"apollo.router.operations.override.query",
"query with overridden fields",
1,
query.label_count = relevant_labels.len() as i64
Expand All @@ -223,7 +223,7 @@ impl Plugin for ProgressiveOverridePlugin {

if !externally_overridden_labels.is_empty() {
u64_counter!(
"apollo.router.schema.override.external",
"apollo.router.operations.override.external",
"override label(s) resolved by coprocessor/rhai",
1
);
Expand Down
6 changes: 3 additions & 3 deletions apollo-router/src/plugins/progressive_override/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async fn query_with_overridden_labels_metrics() {
async {
query_with_labels("{ percent100 { foo } }", vec![]).await;
assert_counter!(
"apollo.router.schema.override.query",
"apollo.router.operations.override.query",
1,
query.label_count = 2
);
Expand All @@ -328,11 +328,11 @@ async fn query_with_externally_resolved_labels_metrics() {
async {
query_with_labels("{ percent100 { foo } }", vec!["foo"]).await;
assert_counter!(
"apollo.router.schema.override.query",
"apollo.router.operations.override.query",
1,
query.label_count = 2
);
assert_counter!("apollo.router.schema.override.external", 1);
assert_counter!("apollo.router.operations.override.external", 1);
}
.with_metrics()
.await;
Expand Down

0 comments on commit 2b628d8

Please sign in to comment.