@@ -99,6 +99,7 @@ struct BillingMetricsCollector {
9999 pub total_bytes_scanned_in_object_store_calls_by_date : HashMap < String , HashMap < String , u64 > > ,
100100 pub total_input_llm_tokens_by_date : HashMap < String , HashMap < String , HashMap < String , u64 > > > , // provider -> model -> date -> count
101101 pub total_output_llm_tokens_by_date : HashMap < String , HashMap < String , HashMap < String , u64 > > > ,
102+ pub total_metrics_collected_by_date : HashMap < String , u64 > ,
102103 pub event_time : chrono:: NaiveDateTime ,
103104}
104105
@@ -193,6 +194,14 @@ impl BillingMetricsCollector {
193194 & self . total_bytes_scanned_in_query_by_date ,
194195 ) ;
195196 }
197+
198+ if !self . total_metrics_collected_by_date . is_empty ( ) {
199+ add_simple_metric (
200+ events,
201+ "total_metrics_collected" ,
202+ & self . total_metrics_collected_by_date ,
203+ ) ;
204+ }
196205 }
197206
198207 /// Add object store metrics (method-based) to the events vector
@@ -1263,6 +1272,7 @@ fn is_simple_metric(metric: &str) -> bool {
12631272 | "parseable_total_query_calls_by_date"
12641273 | "parseable_total_files_scanned_in_query_by_date"
12651274 | "parseable_total_bytes_scanned_in_query_by_date"
1275+ | "parseable_total_metrics_collected_by_date"
12661276 )
12671277}
12681278
@@ -1329,6 +1339,11 @@ fn process_simple_metric(
13291339 . total_bytes_scanned_in_query_by_date
13301340 . insert ( date. to_string ( ) , value) ;
13311341 }
1342+ "parseable_total_metrics_collected_by_date" => {
1343+ collector
1344+ . total_metrics_collected_by_date
1345+ . insert ( date. to_string ( ) , value) ;
1346+ }
13321347 _ => { }
13331348 }
13341349 }
0 commit comments