Macro prometheus::register_histogram_vec
source · macro_rules! register_histogram_vec { ($HOPTS:expr, $LABELS_NAMES:expr $(,)?) => { ... }; ($NAME:expr, $HELP:expr, $LABELS_NAMES:expr $(,)?) => { ... }; ($NAME:expr, $HELP:expr, $LABELS_NAMES:expr, $BUCKETS:expr $(,)?) => { ... }; }
Expand description
Create a HistogramVec
and registers to default registry.
§Examples
let opts = histogram_opts!("test_macro_histogram_vec_1", "help");
let histogram_vec = register_histogram_vec!(opts, &["a", "b"]);
assert!(histogram_vec.is_ok());
let histogram_vec =
register_histogram_vec!("test_macro_histogram_vec_2", "help", &["a", "b"]);
assert!(histogram_vec.is_ok());
let histogram_vec = register_histogram_vec!("test_macro_histogram_vec_3",
"help",
&["test_label"],
vec![0.0, 1.0, 2.0]);
assert!(histogram_vec.is_ok());