Skip to content

Commit

Permalink
chore: update metriken library
Browse files Browse the repository at this point in the history
Updates the metriken metrics library to version 0.2.1 and converts
all metrics declarations to using the attribute macro. This will
allow us to easily add additional metric metadata later.
  • Loading branch information
brayniac committed Aug 8, 2023
1 parent 066102b commit e8dfef8
Show file tree
Hide file tree
Showing 57 changed files with 1,117 additions and 509 deletions.
96 changes: 55 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ httparse = "1.8.0"
libc = "0.2.139"
log = "0.4.17"
memmap2 = "0.5.8"
metriken = "0.1.1"
metriken = "0.2.1"
metrohash = "1.0.6"
mio = "0.8.5"
nom = "7.1.3"
Expand All @@ -65,7 +65,7 @@ quote = "1.0.23"
rand = "0.8.5"
rand_chacha = "0.3.1"
rand_xoshiro = "0.6.0"
ringlog = "0.1.0"
ringlog = "0.2.0"
serde = "1.0.152"
serde_json = "1.0.91"
signal-hook = "0.3.15"
Expand Down
3 changes: 2 additions & 1 deletion src/common/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ macro_rules! test_no_duplicates {

pub use test_no_duplicates;

gauge!(PID, "the process id");
#[metric(name = "pid", description = "the process id")]
pub static PID: Gauge = Gauge::new();

pub fn init() {
PID.set(std::process::id().into());
Expand Down
Loading

0 comments on commit e8dfef8

Please sign in to comment.