diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2024-09-04 23:06:54 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-04 11:06:54 -0700 |
| commit | 16984ef07ac4c70b58d462cb6bcc7f3be207a1fa (patch) | |
| tree | dd0b8359f87186a23f0c1a32825145ae468cfda3 | |
| parent | 67a252ee8a0cbcf0f33cb7c94de21d4791ef1f39 (diff) | |
| download | seaweedfs-16984ef07ac4c70b58d462cb6bcc7f3be207a1fa.tar.xz seaweedfs-16984ef07ac4c70b58d462cb6bcc7f3be207a1fa.zip | |
[s3] reducing the number of metrics for 403 (#5961)
reducing the number of metrics
| -rw-r--r-- | weed/s3api/stats.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/weed/s3api/stats.go b/weed/s3api/stats.go index 42366b18a..ee52da11d 100644 --- a/weed/s3api/stats.go +++ b/weed/s3api/stats.go @@ -16,10 +16,7 @@ func track(f http.HandlerFunc, action string) http.HandlerFunc { 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 = "" - } + bucket = "" } stats_collect.S3RequestHistogram.WithLabelValues(action, bucket).Observe(time.Since(start).Seconds()) stats_collect.S3RequestCounter.WithLabelValues(action, strconv.Itoa(recorder.Status), bucket).Inc() |
