File tree 2 files changed +14
-1
lines changed
apollo-router/src/metrics
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change
1
+ ### Submit new metrics to Apollo ([ PR #5270 ] ( https://github.com/apollographql/router/pull/5270 ) )
2
+
3
+ The router submits two new metrics to Apollo:
4
+ - ` apollo.router.lifecycle.api_schema ` provides us feedback on the experimental Rust-based API schema generation.
5
+ - ` apollo.router.lifecycle.license ` provides metrics on license expiration. We use this to improve the reliability of the license check mechanism.
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl FilterMeterProvider {
94
94
. delegate ( delegate)
95
95
. allow (
96
96
Regex :: new (
97
- r"apollo\.(graphos\.cloud|router\.(operations?|config|schema|query|query_planning))(\..*|$)" ,
97
+ r"apollo\.(graphos\.cloud|router\.(operations?|lifecycle| config|schema|query|query_planning))(\..*|$)" ,
98
98
)
99
99
. expect ( "regex should have been valid" ) ,
100
100
)
@@ -286,6 +286,10 @@ mod test {
286
286
. u64_counter ( "apollo.router.query_planning.test" )
287
287
. init ( )
288
288
. add ( 1 , & [ ] ) ;
289
+ filtered
290
+ . u64_counter ( "apollo.router.lifecycle.api_schema" )
291
+ . init ( )
292
+ . add ( 1 , & [ ] ) ;
289
293
meter_provider. force_flush ( & cx) . unwrap ( ) ;
290
294
291
295
let metrics: Vec < _ > = exporter
@@ -308,6 +312,10 @@ mod test {
308
312
assert ! ( !metrics
309
313
. iter( )
310
314
. any( |m| m. name == "apollo.router.unknown.test" ) ) ;
315
+
316
+ assert ! ( metrics
317
+ . iter( )
318
+ . any( |m| m. name == "apollo.router.lifecycle.api_schema" ) ) ;
311
319
}
312
320
313
321
#[ tokio:: test( flavor = "multi_thread" ) ]
You can’t perform that action at this time.
0 commit comments