[−][src]Macro metrics::counter
Records a counter.
Functionally equivalent to calling Recorder::record_counter
.
Examples
fn do_thing() { let count: u64 = 42; counter!("do_thing", count); }
Labels can also be passed along:
fn do_thing() { let count: u64 = 42; let user: String = String::from("jane"); counter!("do_thing", count, "service" => "admin", "user" => user); }