SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
avoid increasing the coordinates of metric labels (#3785)
Konstantin Lebedevec46a34f338a
diff --git a/weed/s3api/stats.go b/weed/s3api/stats.goindex cfdb3fb69b..2b36478ad9 100644--- a/weed/s3api/stats.go+++ b/weed/s3api/stats.go@@ -33,6 +33,12 @@ func track(f http.HandlerFunc, action string) http.HandlerFunc {recorder := NewStatusResponseWriter(w)start := time.Now()f(recorder, r)+ if recorder.Status == http.StatusForbidden {+ if m, _ := stats_collect.S3RequestCounter.GetMetricWithLabelValues(+ action, strconv.Itoa(http.StatusOK), bucket); m == nil {+ bucket = ""+ }+ }stats_collect.S3RequestHistogram.WithLabelValues(action, bucket).Observe(time.Since(start).Seconds())stats_collect.S3RequestCounter.WithLabelValues(action, strconv.Itoa(recorder.Status), bucket).Inc()}