Skip to content

Commit

Permalink
Get rid of some old metric infra code
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Sep 18, 2024
1 parent f48436e commit 3409e93
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
3 changes: 1 addition & 2 deletions ipa-core/src/cli/verbosity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 0 additions & 8 deletions ipa-core/src/helpers/gateway/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ impl<I: TransportIdentity, M: Message> SendingEnd<I, M> {
))]
pub async fn send<B: Borrow<M>>(&self, record_id: RecordId, msg: B) -> Result<(), Error<I>> {
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,
Expand Down
3 changes: 0 additions & 3 deletions ipa-core/src/net/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 3409e93

Please sign in to comment.