pub fn match_all_by_regex(data: &[Metric], re: Regex) -> Vec<&Metric>
Expand description
Returns all metrics that evaluate to “true” for the regex on the metrics name, not the label. If called in a loop, use “lazy_static” to ensure that regular expressions are compiled exactly once. ref. https://github.com/rust-lang/regex#usage-avoid-compiling-the-same-regex-in-a-loop