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

@@ -479,6 +479,10 @@ func bucketMetricTTLControl() {
c := S3RequestCounter.DeletePartialMatch(labels)
c += S3RequestHistogram.DeletePartialMatch(labels)
c += S3TimeToFirstByteHistogram.DeletePartialMatch(labels)
c += S3BucketTrafficReceivedBytesCounter.DeletePartialMatch(labels)
c += S3BucketTrafficSentBytesCounter.DeletePartialMatch(labels)
c += S3DeletedObjectsCounter.DeletePartialMatch(labels)
c += S3UploadedObjectsCounter.DeletePartialMatch(labels)
glog.V(0).Infof("delete inactive bucket metrics, %s: %d", bucket, c)
}
}