We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0c9aa3 commit 71178f4Copy full SHA for 71178f4
metrics/measured_http/http.go
@@ -81,10 +81,8 @@ func (h *MeasuredHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
81
rwws := &responseWriterWithStatus{w, 0}
82
83
subHandler, pattern := h.Handler(r)
84
- if pattern != "/" {
85
- h.inFlightRequestsGauge.WithLabelValues(pattern).Inc()
86
- defer h.inFlightRequestsGauge.WithLabelValues(pattern).Dec()
87
- }
+ h.inFlightRequestsGauge.WithLabelValues(pattern).Inc()
+ defer h.inFlightRequestsGauge.WithLabelValues(pattern).Dec()
88
89
// Use the method string only if it's a recognized HTTP method. This avoids
90
// ballooning timeseries with invalid methods from public input.
0 commit comments