Fixup per PR review:

* Added internal metric to track `illegal_negative_counter` events
This commit is contained in:
Dave Rawks 2017-08-15 09:03:13 -07:00
parent 42e41f1a7e
commit e493a9c766

View file

@ -275,6 +275,7 @@ func (b *Exporter) Listen(e <-chan Events) {
// will cause the exporter to panic. Instead we will warn and continue to the next event.
if event.Value() < 0.0 {
log.Debugf("Counter %q is: '%f' (counter must be non-negative value)", metricName, event.Value())
eventStats.WithLabelValues("illegal_negative_counter").Inc()
continue
}