File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
apollo-router/src/metrics Expand file tree Collapse file tree 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 {
9494 . delegate ( delegate)
9595 . allow (
9696 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))(\..*|$)" ,
9898 )
9999 . expect ( "regex should have been valid" ) ,
100100 )
@@ -286,6 +286,10 @@ mod test {
286286 . u64_counter ( "apollo.router.query_planning.test" )
287287 . init ( )
288288 . add ( 1 , & [ ] ) ;
289+ filtered
290+ . u64_counter ( "apollo.router.lifecycle.api_schema" )
291+ . init ( )
292+ . add ( 1 , & [ ] ) ;
289293 meter_provider. force_flush ( & cx) . unwrap ( ) ;
290294
291295 let metrics: Vec < _ > = exporter
@@ -308,6 +312,10 @@ mod test {
308312 assert ! ( !metrics
309313 . iter( )
310314 . any( |m| m. name == "apollo.router.unknown.test" ) ) ;
315+
316+ assert ! ( metrics
317+ . iter( )
318+ . any( |m| m. name == "apollo.router.lifecycle.api_schema" ) ) ;
311319 }
312320
313321 #[ tokio:: test( flavor = "multi_thread" ) ]
You can’t perform that action at this time.
0 commit comments