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

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
This commit is contained in:
shuiyisong
2025-07-09 19:46:07 +08:00
committed by GitHub
parent a858f55257
commit d99cd98c01

View File

@@ -390,6 +390,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));