fix: record and delete bucket metrics after inactive (#6523)

Co-authored-by: XYZ <XYZ>
This commit is contained in:
zouyixiong
2025-02-08 02:26:39 +08:00
committed by GitHub
parent 9ebc132ffc
commit 8eab76c5db
5 changed files with 14 additions and 3 deletions

View File

@@ -38,5 +38,6 @@ func TimeToFirstByte(action string, start time.Time, r *http.Request) {
func BucketTrafficSent(bytesTransferred int64, r *http.Request) {
bucket, _ := s3_constants.GetBucketAndObject(r)
stats_collect.RecordBucketActiveTime(bucket)
stats_collect.S3BucketTrafficSentBytesCounter.WithLabelValues(bucket).Add(float64(bytesTransferred))
}