From 3409e93ea02ded124440480a0e80e8908c356305 Mon Sep 17 00:00:00 2001 From: Alex Koshelev Date: Wed, 18 Sep 2024 15:12:29 -0700 Subject: [PATCH] Get rid of some old metric infra code --- ipa-core/src/cli/verbosity.rs | 3 +-- ipa-core/src/helpers/gateway/send.rs | 8 -------- ipa-core/src/net/server/mod.rs | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ipa-core/src/cli/verbosity.rs b/ipa-core/src/cli/verbosity.rs index 53a2bee39..eeb49b816 100644 --- a/ipa-core/src/cli/verbosity.rs +++ b/ipa-core/src/cli/verbosity.rs @@ -40,11 +40,10 @@ impl Verbosity { tracing_subscriber::registry() .with(self.log_filter()) .with(fmt_layer) - .with(MetricsLayer::new()) .init(); let handle = LoggingHandle { - metrics_handle: (!self.quiet).then(install_collector), + metrics_handle: None }; set_global_panic_hook(); diff --git a/ipa-core/src/helpers/gateway/send.rs b/ipa-core/src/helpers/gateway/send.rs index 761c1dffc..4de66a8c7 100644 --- a/ipa-core/src/helpers/gateway/send.rs +++ b/ipa-core/src/helpers/gateway/send.rs @@ -158,14 +158,6 @@ impl SendingEnd { ))] pub async fn send>(&self, record_id: RecordId, msg: B) -> Result<(), Error> { let r = self.inner.send(record_id, msg).await; - // metrics::increment_counter!(RECORDS_SENT, - // STEP => self.inner.channel_id.gate.as_ref().to_string(), - // ROLE => self.sender_id.as_str(), - // ); - // metrics::counter!(BYTES_SENT, M::Size::U64, - // STEP => self.inner.channel_id.gate.as_ref().to_string(), - // ROLE => self.sender_id.as_str(), - // ); ipa_metrics::counter!(BYTES_SENT, M::Size::U64, STEP => &self.inner.channel_id.gate, ROLE => &self.sender_id, diff --git a/ipa-core/src/net/server/mod.rs b/ipa-core/src/net/server/mod.rs index c743f7b4f..a8e93dd67 100644 --- a/ipa-core/src/net/server/mod.rs +++ b/ipa-core/src/net/server/mod.rs @@ -31,7 +31,6 @@ use futures::{ Future, FutureExt, }; use hyper::{body::Incoming, header::HeaderName, Request, Version}; -use metrics::increment_counter; use rustls::{server::WebPkiClientVerifier, RootCertStore}; use rustls_pki_types::CertificateDer; #[cfg(all(feature = "shuttle", test))] @@ -137,8 +136,6 @@ impl MpcHelperServer { .on_request(|request: &hyper::Request<_>, _: &Span| { ipa_metrics::counter!(RequestProtocolVersion::from(request.version()), 1); ipa_metrics::counter!(REQUESTS_RECEIVED, 1); - increment_counter!(RequestProtocolVersion::from(request.version())); - increment_counter!(REQUESTS_RECEIVED); }), ); let handle = Handle::new();