Fixed dispatcher metrics registration
Signed-off-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
parent
255b2073dc
commit
1f77f320a7
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue