fix: skip nan in prom remote write pipeline (#6489)

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
This commit is contained in:
shuiyisong
2025-07-09 19:46:07 +08:00
committed by Yingwen
parent 13401c94e0
commit 8b2d1a3753

View File

@@ -412,6 +412,10 @@ impl PromSeriesProcessor {
let one_sample = series.samples.len() == 1;
for s in series.samples.iter() {
// skip NaN value
if s.value.is_nan() {
continue;
}
let timestamp = s.timestamp;
pipeline_map.insert(GREPTIME_TIMESTAMP.to_string(), Value::Int64(timestamp));
pipeline_map.insert(GREPTIME_VALUE.to_string(), Value::Float64(s.value));