Skip to content

Commit 67b4c5a

Browse files
fix: create metric record in case of empty data
1 parent 47bbb80 commit 67b4c5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/otel/metrics.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ pub fn flatten_metrics_record(metrics_record: &Metric) -> Vec<BTreeMap<String, V
421421
data_point_json.insert(key.clone(), value.clone());
422422
}
423423
}
424+
if data_points_json.is_empty() {
425+
data_points_json.push(metric_json);
426+
}
424427
data_points_json
425428
}
426429

0 commit comments

Comments
 (0)