mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-27 12:49:41 +08:00
[s3] reducing the number of metrics for 403 (#5961)
reducing the number of metrics
This commit is contained in:
parent
67a252ee8a
commit
16984ef07a
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user