mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 18:03:57 +08:00
feat: add in-flight metric for s3/file/volume-server (#6120)
This commit is contained in:
@@ -11,6 +11,10 @@ import (
|
||||
|
||||
func track(f http.HandlerFunc, action string) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
inFlightGauge := stats_collect.S3InFlightRequestsGauge.WithLabelValues(action)
|
||||
inFlightGauge.Inc()
|
||||
defer inFlightGauge.Dec()
|
||||
|
||||
bucket, _ := s3_constants.GetBucketAndObject(r)
|
||||
w.Header().Set("Server", "SeaweedFS "+util.VERSION)
|
||||
recorder := stats_collect.NewStatusResponseWriter(w)
|
||||
|
Reference in New Issue
Block a user