@@ -279,7 +279,7 @@ pub static TOTAL_OBJECT_STORE_CALLS_BY_DATE: Lazy<IntCounterVec> = Lazy::new(||
279
279
"Total object store calls by date" ,
280
280
)
281
281
. namespace ( METRICS_NAMESPACE ) ,
282
- & [ "provider" , " method", "date" ] ,
282
+ & [ "method" , "date" ] ,
283
283
)
284
284
. expect ( "metric can be created" )
285
285
} ) ;
@@ -292,7 +292,20 @@ pub static TOTAL_FILES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE: Lazy<IntCounterVec
292
292
"Total files scanned in object store calls by date" ,
293
293
)
294
294
. namespace ( METRICS_NAMESPACE ) ,
295
- & [ "provider" , "method" , "date" ] ,
295
+ & [ "method" , "date" ] ,
296
+ )
297
+ . expect ( "metric can be created" )
298
+ } ) ;
299
+
300
+ pub static TOTAL_BYTES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE : Lazy < IntCounterVec > =
301
+ Lazy :: new ( || {
302
+ IntCounterVec :: new (
303
+ Opts :: new (
304
+ "total_bytes_scanned_in_object_store_calls_by_date" ,
305
+ "Total bytes scanned in object store calls by date" ,
306
+ )
307
+ . namespace ( METRICS_NAMESPACE ) ,
308
+ & [ "method" , "date" ] ,
296
309
)
297
310
. expect ( "metric can be created" )
298
311
} ) ;
@@ -304,7 +317,7 @@ pub static TOTAL_INPUT_LLM_TOKENS_BY_DATE: Lazy<IntCounterVec> = Lazy::new(|| {
304
317
"Total input LLM tokens used by date" ,
305
318
)
306
319
. namespace ( METRICS_NAMESPACE ) ,
307
- & [ "provider" , " model", "date" ] ,
320
+ & [ "model" , "date" ] ,
308
321
)
309
322
. expect ( "metric can be created" )
310
323
} ) ;
@@ -409,6 +422,11 @@ fn custom_metrics(registry: &Registry) {
409
422
TOTAL_FILES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE . clone ( ) ,
410
423
) )
411
424
. expect ( "metric can be registered" ) ;
425
+ registry
426
+ . register ( Box :: new (
427
+ TOTAL_BYTES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE . clone ( ) ,
428
+ ) )
429
+ . expect ( "metric can be registered" ) ;
412
430
registry
413
431
. register ( Box :: new ( TOTAL_INPUT_LLM_TOKENS_BY_DATE . clone ( ) ) )
414
432
. expect ( "metric can be registered" ) ;
@@ -518,23 +536,24 @@ pub fn increment_bytes_scanned_in_query_by_date(bytes: u64, date: &str) {
518
536
. inc_by ( bytes) ;
519
537
}
520
538
521
- pub fn increment_object_store_calls_by_date ( provider : & str , method : & str , date : & str ) {
539
+ pub fn increment_object_store_calls_by_date ( method : & str , date : & str ) {
522
540
TOTAL_OBJECT_STORE_CALLS_BY_DATE
523
- . with_label_values ( & [ provider , method, date] )
541
+ . with_label_values ( & [ method, date] )
524
542
. inc ( ) ;
525
543
}
526
544
527
- pub fn increment_files_scanned_in_object_store_calls_by_date (
528
- provider : & str ,
529
- method : & str ,
530
- count : u64 ,
531
- date : & str ,
532
- ) {
545
+ pub fn increment_files_scanned_in_object_store_calls_by_date ( method : & str , count : u64 , date : & str ) {
533
546
TOTAL_FILES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE
534
- . with_label_values ( & [ provider , method, date] )
547
+ . with_label_values ( & [ method, date] )
535
548
. inc_by ( count) ;
536
549
}
537
550
551
+ pub fn increment_bytes_scanned_in_object_store_calls_by_date ( method : & str , bytes : u64 , date : & str ) {
552
+ TOTAL_BYTES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE
553
+ . with_label_values ( & [ method, date] )
554
+ . inc_by ( bytes) ;
555
+ }
556
+
538
557
pub fn increment_input_llm_tokens_by_date ( provider : & str , model : & str , tokens : u64 , date : & str ) {
539
558
TOTAL_INPUT_LLM_TOKENS_BY_DATE
540
559
. with_label_values ( & [ provider, model, date] )
0 commit comments