Skip to content

Commit 2fd5316

Browse files
add provider label for llm token, remove redundant metrics capture for get_object
1 parent 74f6703 commit 2fd5316

File tree

4 files changed

+1
-34
lines changed

4 files changed

+1
-34
lines changed

src/metrics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ pub static TOTAL_INPUT_LLM_TOKENS_BY_DATE: Lazy<IntCounterVec> = Lazy::new(|| {
317317
"Total input LLM tokens used by date",
318318
)
319319
.namespace(METRICS_NAMESPACE),
320-
&["model", "date"],
320+
&["provider", "model", "date"],
321321
)
322322
.expect("metric can be created")
323323
});

src/storage/azure_blob.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -513,17 +513,6 @@ impl ObjectStorage for BlobStore {
513513
.map_err(ObjectStorageError::PathError)?,
514514
)
515515
.await?;
516-
increment_files_scanned_in_object_store_calls_by_date(
517-
"GET",
518-
1,
519-
&Utc::now().date_naive().to_string(),
520-
);
521-
increment_bytes_scanned_in_object_store_calls_by_date(
522-
"GET",
523-
byts.len() as u64,
524-
&Utc::now().date_naive().to_string(),
525-
);
526-
increment_object_store_calls_by_date("GET", &Utc::now().date_naive().to_string());
527516
res.push(byts);
528517
}
529518

src/storage/gcs.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -494,17 +494,6 @@ impl ObjectStorage for Gcs {
494494
.map_err(ObjectStorageError::PathError)?,
495495
)
496496
.await?;
497-
increment_files_scanned_in_object_store_calls_by_date(
498-
"GET",
499-
1,
500-
&Utc::now().date_naive().to_string(),
501-
);
502-
increment_bytes_scanned_in_object_store_calls_by_date(
503-
"GET",
504-
byts.len() as u64,
505-
&Utc::now().date_naive().to_string(),
506-
);
507-
increment_object_store_calls_by_date("GET", &Utc::now().date_naive().to_string());
508497
res.push(byts);
509498
}
510499

src/storage/s3.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -658,17 +658,6 @@ impl ObjectStorage for S3 {
658658
.map_err(ObjectStorageError::PathError)?,
659659
)
660660
.await?;
661-
increment_files_scanned_in_object_store_calls_by_date(
662-
"GET",
663-
1,
664-
&Utc::now().date_naive().to_string(),
665-
);
666-
increment_bytes_scanned_in_object_store_calls_by_date(
667-
"GET",
668-
byts.len() as u64,
669-
&Utc::now().date_naive().to_string(),
670-
);
671-
increment_object_store_calls_by_date("GET", &Utc::now().date_naive().to_string());
672661
res.push(byts);
673662
}
674663
// Record total files scanned

0 commit comments

Comments
 (0)