Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Extend error message when number of labels and its values are mismatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
lesovsky committed Sep 10, 2021
1 parent 9f215ce commit 1c00d82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/collector/collector_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (d *typedDesc) newConstMetric(value float64, labelValues ...string) prometh
}

if len(d.labelNames) != len(labelValues) {
log.Errorf("number of labels and collected label values does not match, want %d, got %d", len(d.labelNames), len(labelValues))
log.Errorf("number of labels and collected label values does not match, want: %v; got %v; metric description: %s; skip metric", d.labelNames, labelValues, d.desc.String())
return nil
}

Expand Down

0 comments on commit 1c00d82

Please sign in to comment.