Skip to main content

num_attr

Function num_attr 

Source
pub fn num_attr(x: f64) -> AttrValue
Expand description

Round a metric and pick the natural JSON scalar: an integral value becomes an Int (so 1.0 serializes as 1), otherwise a Float. This is the single bridge metric producers use before inserting into attrs.