mirror of https://github.com/prometheus/prometheus
register federation failure metrics (#7081)
Closes gh-7080 Signed-off-by: Julian Taylor <juliantaylor108@gmail.com>pull/7035/head
parent
62bd77bf93
commit
05442b31c8
|
@ -44,6 +44,10 @@ var (
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func registerFederationMetrics(r prometheus.Registerer) {
|
||||||
|
r.MustRegister(federationWarnings, federationErrors)
|
||||||
|
}
|
||||||
|
|
||||||
func (h *Handler) federation(w http.ResponseWriter, req *http.Request) {
|
func (h *Handler) federation(w http.ResponseWriter, req *http.Request) {
|
||||||
h.mtx.RLock()
|
h.mtx.RLock()
|
||||||
defer h.mtx.RUnlock()
|
defer h.mtx.RUnlock()
|
||||||
|
|
|
@ -139,6 +139,7 @@ func newMetrics(r prometheus.Registerer) *metrics {
|
||||||
|
|
||||||
if r != nil {
|
if r != nil {
|
||||||
r.MustRegister(m.requestCounter, m.requestDuration, m.responseSize)
|
r.MustRegister(m.requestCounter, m.requestDuration, m.responseSize)
|
||||||
|
registerFederationMetrics(r)
|
||||||
}
|
}
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue