Skip to main content

is_valid_label_name

Function is_valid_label_name 

Source
fn is_valid_label_name(name: &str) -> bool
Expand description

Matches Prometheus’s label name grammar: [a-zA-Z_][a-zA-Z0-9_]*.

Unlike the metric-name grammar (name_valid, computed in MIR), this stays in Rust: it applies to every key of the labels map, an unbounded per-row collection that doesn’t fit a scalar Map expression.