Skip to content

Commit 10a9799

Browse files
authored
Merge pull request #20 from lazy-electron-consulting/negative-ones
ignore dummy values in statesets
2 parents 8f49655 + c0634ca commit 10a9799

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/metrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (c statesetCollector) Collect(ch chan<- prometheus.Metric) {
135135
for _, s := range c.states {
136136
state := c.WithLabelValues(s.Name)
137137
// TODO: skip the float64 steps
138-
if math.Abs(s.Value-val) < 1 {
138+
if val > -1 && math.Abs(s.Value-val) < 1 {
139139
state.Set(1)
140140
} else {
141141
state.Set(0)

0 commit comments

Comments
 (0)