mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
register federation failure metrics (#7081)
Closes gh-7080 Signed-off-by: Julian Taylor <juliantaylor108@gmail.com>
This commit is contained in:
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) {
|
||||
h.mtx.RLock()
|
||||
defer h.mtx.RUnlock()
|
||||
|
|
|
@ -139,6 +139,7 @@ func newMetrics(r prometheus.Registerer) *metrics {
|
|||
|
||||
if r != nil {
|
||||
r.MustRegister(m.requestCounter, m.requestDuration, m.responseSize)
|
||||
registerFederationMetrics(r)
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue