mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
web: Initialize requestCounter metrics to 0 with handler and 200k labels.
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
This commit is contained in:
parent
86a7064dcf
commit
8bc2a19469
|
@ -158,6 +158,7 @@ func (m *metrics) instrumentHandlerWithPrefix(prefix string) func(handlerName st
|
|||
}
|
||||
|
||||
func (m *metrics) instrumentHandler(handlerName string, handler http.HandlerFunc) http.HandlerFunc {
|
||||
m.requestCounter.WithLabelValues(handlerName, "200").Add(0)
|
||||
return promhttp.InstrumentHandlerCounter(
|
||||
m.requestCounter.MustCurryWith(prometheus.Labels{"handler": handlerName}),
|
||||
promhttp.InstrumentHandlerDuration(
|
||||
|
|
Loading…
Reference in a new issue