diff options
| author | steve.wei <coderushing@gmail.com> | 2024-10-15 03:10:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-14 12:10:05 -0700 |
| commit | cfbe45c7658350e2b8f636d093a2bbe2028f8521 (patch) | |
| tree | a7e636b3e61fa1e8b204fa687bc613aaa62046ab /weed/s3api | |
| parent | a1f06c391cbea9b61f6cff8c3db224e466c06351 (diff) | |
| download | seaweedfs-cfbe45c7658350e2b8f636d093a2bbe2028f8521.tar.xz seaweedfs-cfbe45c7658350e2b8f636d093a2bbe2028f8521.zip | |
feat: add in-flight metric for s3/file/volume-server (#6120)
Diffstat (limited to 'weed/s3api')
| -rw-r--r-- | weed/s3api/stats.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/s3api/stats.go b/weed/s3api/stats.go index cd04b9970..415ec55dd 100644 --- a/weed/s3api/stats.go +++ b/weed/s3api/stats.go @@ -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) |
