Skip to content

Commit

Permalink
feat: histogram label
Browse files Browse the repository at this point in the history
  • Loading branch information
joske committed Feb 15, 2024
1 parent 6e182c6 commit 839175e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metrics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ pub fn histogram<V: Into<f64>>(name: &'static str, value: V) {
let histogram = ::metrics::histogram!(name);
histogram.record(value.into());
}

pub fn histogram_label<V: Into<f64>>(name: &'static str, label_key: &'static str, label_value: String, value: V) {
::metrics::histogram!(name, label_key => label_value).record(value.into());
}

0 comments on commit 839175e

Please sign in to comment.