diff --git a/crates/dscvr-telemetry-util/Cargo.toml b/crates/dscvr-telemetry-util/Cargo.toml index 3ed86ed..6b13920 100644 --- a/crates/dscvr-telemetry-util/Cargo.toml +++ b/crates/dscvr-telemetry-util/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [dependencies] axum = "0.6" http = "0.2" -metrics = "0.21" -metrics-exporter-prometheus = "0.12" +metrics = "0.23" +metrics-exporter-prometheus = "0.15" diff --git a/crates/dscvr-telemetry-util/src/lib.rs b/crates/dscvr-telemetry-util/src/lib.rs index 2bbdc2b..d3cc4a1 100644 --- a/crates/dscvr-telemetry-util/src/lib.rs +++ b/crates/dscvr-telemetry-util/src/lib.rs @@ -79,8 +79,8 @@ pub mod axum { ("status", status), ]; - metrics::increment_counter!(AXUM_HTTP_REQUESTS_TOTAL, &labels); - metrics::histogram!(AXUM_HTTP_REQUESTS_DURATION_SECONDS, latency, &labels); + metrics::counter!(AXUM_HTTP_REQUESTS_TOTAL, &labels).increment(1); + metrics::histogram!(AXUM_HTTP_REQUESTS_DURATION_SECONDS, &labels).record(latency); } response