diff --git a/events/bus.go b/events/bus.go index 7ca091f3..f4e4879a 100644 --- a/events/bus.go +++ b/events/bus.go @@ -126,7 +126,11 @@ func (bus *EventBus) Publish(event Event) { bus.lock.Lock() defer bus.lock.Unlock() log.Debugf("event: %v", event) - collector.WithLabelValues(event.Code.String(), event.Source).Inc() + + if event.Code.String() != "Metric" { + collector.WithLabelValues(event.Code.String(), event.Source).Inc() + } + for subscriber := range bus.registry { // sending to an unsubscribed Subscriber shouldn't be a runtime // error, so this is in intentionally allowed to panic here