add isNan to clusterMetric aggregation

This commit is contained in:
Christoph Kluge
2026-02-02 14:34:49 +01:00
parent f2285e603b
commit 7b4e2fcf59

View File

@@ -928,7 +928,11 @@ func (r *queryResolver) ClusterMetrics(ctx context.Context, cluster string, metr
// Sum if init'd and matching size
if okData && len(ser.Data) == len(collectorData[metric]) {
for i, val := range ser.Data {
collectorData[metric][i] += val
if val.IsNaN() {
continue
} else {
collectorData[metric][i] += val
}
}
} else if okData {
cclog.Debugf("ClusterMetrics Skip Sum: Data Diff -> %s at %s; Want Size %d, Have Size %d", metric, ser.Hostname, len(collectorData[metric]), len(ser.Data))