fix: do not consider Inf and NaN for formula (#5124)

This commit is contained in:
Srikanth Chekuri 2024-05-31 16:32:22 +05:30 committed by GitHub
parent ba0f63ad1e
commit f927969c7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1011,7 +1011,7 @@ func (r *ThresholdRule) String() string {
func removeGroupinSetPoints(series v3.Series) []v3.Point {
var result []v3.Point
for _, s := range series.Points {
if s.Timestamp > 0 {
if s.Timestamp > 0 && !math.IsNaN(s.Value) && !math.IsInf(s.Value, 0) {
result = append(result, s)
}
}