WFE: Track in-flight for "/" (#7759)

This commit is contained in:
Samantha Frank 2024-10-18 12:59:26 -04:00 committed by GitHub
parent d0c9aa3808
commit 71178f4ca4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -81,10 +81,8 @@ func (h *MeasuredHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
rwws := &responseWriterWithStatus{w, 0}
subHandler, pattern := h.Handler(r)
if pattern != "/" {
h.inFlightRequestsGauge.WithLabelValues(pattern).Inc()
defer h.inFlightRequestsGauge.WithLabelValues(pattern).Dec()
}
h.inFlightRequestsGauge.WithLabelValues(pattern).Inc()
defer h.inFlightRequestsGauge.WithLabelValues(pattern).Dec()
// Use the method string only if it's a recognized HTTP method. This avoids
// ballooning timeseries with invalid methods from public input.