@@ -468,6 +468,30 @@ pub static TOTAL_CLUSTER_FILES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE: Lazy<IntGa
468468 } ,
469469) ;
470470
471+ pub static TOTAL_CLUSTER_INPUT_LLM_TOKENS_BY_DATE : Lazy < IntGaugeVec > = Lazy :: new ( || {
472+ IntGaugeVec :: new (
473+ Opts :: new (
474+ "total_cluster_input_llm_tokens_by_date" ,
475+ "Total cluster input LLM tokens used by date (Gauge for cluster billing)" ,
476+ )
477+ . namespace ( METRICS_NAMESPACE ) ,
478+ & [ "provider" , "model" , "date" ] ,
479+ )
480+ . expect ( "metric can be created" )
481+ } ) ;
482+
483+ pub static TOTAL_CLUSTER_OUTPUT_LLM_TOKENS_BY_DATE : Lazy < IntGaugeVec > = Lazy :: new ( || {
484+ IntGaugeVec :: new (
485+ Opts :: new (
486+ "total_cluster_output_llm_tokens_by_date" ,
487+ "Total cluster output LLM tokens used by date (Gauge for cluster billing)" ,
488+ )
489+ . namespace ( METRICS_NAMESPACE ) ,
490+ & [ "provider" , "model" , "date" ] ,
491+ )
492+ . expect ( "metric can be created" )
493+ } ) ;
494+
471495pub static STORAGE_REQUEST_RESPONSE_TIME : Lazy < HistogramVec > = Lazy :: new ( || {
472496 HistogramVec :: new (
473497 HistogramOpts :: new ( "storage_request_response_time" , "Storage Request Latency" )
@@ -605,6 +629,12 @@ fn custom_metrics(registry: &Registry) {
605629 TOTAL_CLUSTER_FILES_SCANNED_IN_OBJECT_STORE_CALLS_BY_DATE . clone ( ) ,
606630 ) )
607631 . expect ( "metric can be registered" ) ;
632+ registry
633+ . register ( Box :: new ( TOTAL_CLUSTER_INPUT_LLM_TOKENS_BY_DATE . clone ( ) ) )
634+ . expect ( "metric can be registered" ) ;
635+ registry
636+ . register ( Box :: new ( TOTAL_CLUSTER_OUTPUT_LLM_TOKENS_BY_DATE . clone ( ) ) )
637+ . expect ( "metric can be registered" ) ;
608638 registry
609639 . register ( Box :: new ( STORAGE_REQUEST_RESPONSE_TIME . clone ( ) ) )
610640 . expect ( "metric can be registered" ) ;
0 commit comments