mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-12-24 14:30:29 +00:00
Merge pull request #224 from ptqa/master
Fix inconsistent label cardinality error
This commit is contained in:
commit
56a091a693
1 changed files with 1 additions and 1 deletions
|
@ -458,7 +458,6 @@ func (b *Exporter) handleEvent(event Event) {
|
|||
|
||||
metricName := ""
|
||||
prometheusLabels := event.Labels()
|
||||
sortedLabelNames := getSortedLabelNames(prometheusLabels)
|
||||
if present {
|
||||
if mapping.Name == "" {
|
||||
log.Debugf("The mapping of '%s' for match '%s' generates an empty metric name", event.MetricName(), mapping.Match)
|
||||
|
@ -475,6 +474,7 @@ func (b *Exporter) handleEvent(event Event) {
|
|||
metricName = escapeMetricName(event.MetricName())
|
||||
}
|
||||
|
||||
sortedLabelNames := getSortedLabelNames(prometheusLabels)
|
||||
switch ev := event.(type) {
|
||||
case *CounterEvent:
|
||||
// We don't accept negative values for counters. Incrementing the counter with a negative number
|
||||
|
|
Loading…
Reference in a new issue