Function prometheus_manager::match_all_by_regex_set
source · [−]pub fn match_all_by_regex_set(data: &[Metric], rset: RegexSet) -> Vec<&Metric>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
Expand description
Returns all metrics that evaluate to “true” for the regex set 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