Skip to main content

format_prometheus_sample_value

Function format_prometheus_sample_value 

Source
fn format_prometheus_sample_value(value: f64) -> String
Expand description

Formats a sample value for the Prometheus HTTP API.

Finite sample strings use ryu’s shortest-roundtrip representation and may differ textually from previous Rust/Prometheus wire formatting; values parse identically. Non-finite values use Prometheus’ +Inf, -Inf and NaN.