mirror of
https://github.com/stakater/Reloader.git
synced 2026-02-14 18:09:50 +00:00
fix: Treat missing metrics as info
This commit is contained in:
@@ -608,7 +608,11 @@ func compareMetricWithExpected(name string, oldValue, newValue, expected float64
|
||||
oldMeetsExp := meetsExpected(oldValue, expected)
|
||||
newMeetsExp := meetsExpected(newValue, expected)
|
||||
|
||||
if expected > 0 && threshold.metricType == ShouldMatch {
|
||||
isNewMetric := info.isCounter && oldValue == 0 && newValue > 0 && expected == 0
|
||||
|
||||
if isNewMetric {
|
||||
status = "info"
|
||||
} else if expected > 0 && threshold.metricType == ShouldMatch {
|
||||
if newMeetsExp == "✗" {
|
||||
status = "fail"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user