mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04: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
1 changed files with 1 additions and 0 deletions
|
|
@ -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