Function reth_node_metrics::formatting::key_to_parts

pub fn key_to_parts(
    key: &Key,
    default_labels: Option<&IndexMap<String, String>>,
) -> (String, Vec<String>)
Expand description

Breaks a key into the name and label components, with optional default labels.

If any of the default labels are not already present, they will be added to the overall list of labels.

Both the metric name, and labels, are sanitized. See sanitize_metric_name, sanitize_label_key, and sanitize_label_value for more information.