mirror of
https://github.com/prometheus/alertmanager.git
synced 2026-02-05 15:45:34 +01:00
Fixed dispatcher metrics registration
Signed-off-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
@@ -53,7 +53,11 @@ func NewDispatcherMetrics(r prometheus.Registerer) *DispatcherMetrics {
|
||||
},
|
||||
),
|
||||
}
|
||||
prometheus.MustRegister(m.aggrGroups, m.processingDuration)
|
||||
|
||||
if r != nil {
|
||||
r.MustRegister(m.aggrGroups, m.processingDuration)
|
||||
}
|
||||
|
||||
return &m
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user