twitter / rustcommon

Common Twitter Rust lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add descriptions to metric macro invocation

hderms opened this issue · comments

We should allow the user to describe a metric when defining it. This would be useful for users of this library because it would permit them to add CLI flags like --stats to dump information about the static metrics being recorded.

the idea being to permit a metric definition like so:

#[metric(
    name = "view-counter",
    description = "counts the number of views to our website"
)]
static VIEW_COUNTER: Counter = Counter::new();