diff --git a/Cargo.lock b/Cargo.lock index 39f10c3e..c97fb091 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3655,9 +3655,9 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.22.3" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" +checksum = "cf41c1a7c32ed72abe5082fb19505b969095c12da9f5732a4bc9878757fd087c" dependencies = [ "dtoa", "itoa", diff --git a/chirpstack/Cargo.toml b/chirpstack/Cargo.toml index 73a0a0b9..ce0af3e8 100644 --- a/chirpstack/Cargo.toml +++ b/chirpstack/Cargo.toml @@ -147,7 +147,7 @@ async-recursion = "1.1" regex = "1.11" petgraph = "0.7" - prometheus-client = "0.22" + prometheus-client = "0.23" pin-project = "1.1" scoped-futures = { version = "0.1", features = ["std"] } signal-hook = "0.3" diff --git a/chirpstack/src/uplink/mod.rs b/chirpstack/src/uplink/mod.rs index a1b3cf7e..79e7304b 100644 --- a/chirpstack/src/uplink/mod.rs +++ b/chirpstack/src/uplink/mod.rs @@ -51,8 +51,8 @@ lazy_static! { ); counter }; - static ref DEDUPLICATE_LOCKED_COUNTER: Family<(), Counter> = { - let counter = Family::<(), Counter>::default(); + static ref DEDUPLICATE_LOCKED_COUNTER: Counter = { + let counter = Counter::default(); prometheus::register( "deduplicate_locked_count", "Number of times the deduplication function was called and the deduplication was already locked", @@ -60,8 +60,8 @@ lazy_static! { ); counter }; - static ref DEDUPLICATE_NO_LOCK_COUNTER: Family<(), Counter> = { - let counter = Family::<(), Counter>::default(); + static ref DEDUPLICATE_NO_LOCK_COUNTER: Counter = { + let counter = Counter::default(); prometheus::register( "deduplicate_no_lock_count", "Number of times the deduplication function was called and it was not yet locked", @@ -203,12 +203,12 @@ async fn _deduplicate_uplink( "Deduplication is already locked by an other process" ); - DEDUPLICATE_LOCKED_COUNTER.get_or_create(&()).inc(); + DEDUPLICATE_LOCKED_COUNTER.inc(); return Ok(()); } - DEDUPLICATE_NO_LOCK_COUNTER.get_or_create(&()).inc(); + DEDUPLICATE_NO_LOCK_COUNTER.inc(); trace!( key = key.as_str(),