Alerting: Fix stale values associated with states that have gone to NoData, unify values calculation (#89807)

* Unify values

* Fix with latest changes on main

* Fix up NaN test

* Keep refIDs with -1 as value

* Test that refIDs are preserved on Normal to Error transition

* Alerting to err test too

* Add a blurb to docs about this behavior
This commit is contained in:
Alexander Weaver
2024-07-08 12:30:23 -05:00
committed by GitHub
parent f763f2085b
commit 3b6a8775bb
11 changed files with 209 additions and 82 deletions
+6
View File
@@ -80,6 +80,12 @@ func WithLabels(labels data.Labels) ResultMutator {
}
}
func WithValues(values map[string]NumberValueCapture) ResultMutator {
return func(r *Result) {
r.Values = values
}
}
type FakeLoadedMetricsReader struct {
fingerprints map[data.Fingerprint]struct{}
}