fix: record and delete bucket metrics after inactive (#6523)
Co-authored-by: XYZ <XYZ>
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user