Commit b1d0bd4
authored
license: fix metric cardinality panic in expiry metric (#3868)
The license expiry metric initialization incorrectly passed a description
string as the second parameter to NewGauge. The method signature is
NewGauge(name string, labelKeys ...string), so the description was
interpreted as a label key, causing Prometheus to expect 1 label value.
When Set() was called with 0 label values, it panicked with
"inconsistent label cardinality: expected 1 label values but got 0".
Remove the erroneous description parameter. Metric descriptions are not
supported by the NewGauge API.1 parent 9a6a684 commit b1d0bd4
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 152 | + | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
| |||
0 commit comments