Skip to main content

openmetrics_unit_to_ucum

Function openmetrics_unit_to_ucum 

Source
pub fn openmetrics_unit_to_ucum(unit: &str) -> Option<&'static str>
Expand description

Maps an OpenMetrics unit name (open vocabulary full words: seconds, bytes) to the UCUM code the greptime.semantic.metric.unit option is defined in. Only the OpenMetrics base units are mapped; anything else is dropped — a missing unit beats a corrupted cross-protocol vocabulary.