macro_rules! register_counter_with_registry {
    (@of_type $TYPE: ident, $OPTS:expr, $REGISTRY:expr) => { ... };
    ($OPTS:expr, $REGISTRY:expr $(,)?) => { ... };
    ($NAME:expr, $HELP:expr, $REGISTRY:expr $(,)?) => { ... };
}
Expand description

Create a Counter and registers to a custom registry.

Examples

let mut labels = HashMap::new();
labels.insert("mykey".to_string(), "myvalue".to_string());
let custom_registry = Registry::new_custom(Some("myprefix".to_string()), Some(labels)).unwrap();
let opts = opts!("test_macro_counter_1", "help");
let res1 = register_counter_with_registry!(opts, custom_registry);
assert!(res1.is_ok());

let res2 = register_counter_with_registry!("test_macro_counter_2", "help", custom_registry);
assert!(res2.is_ok());