From 97677cd746cdd0d6e445f708211499043169630d Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 13 Oct 2023 19:46:20 -0700 Subject: [PATCH] remove some instruments --- web3_proxy/src/compute_units.rs | 5 +---- web3_proxy/src/rpcs/consensus.rs | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/web3_proxy/src/compute_units.rs b/web3_proxy/src/compute_units.rs index 45645596..240982b0 100644 --- a/web3_proxy/src/compute_units.rs +++ b/web3_proxy/src/compute_units.rs @@ -8,7 +8,7 @@ use migration::sea_orm::prelude::Decimal; use std::{ops::Add, str::FromStr}; -use tracing::{instrument, trace, warn}; +use tracing::{trace, warn}; /// TODO: i don't like how we use this inside the config and also have it available publicly. we should only getting this value from the config pub fn default_usd_per_cu(chain_id: u64) -> Decimal { @@ -42,7 +42,6 @@ where impl ComputeUnit { /// costs can vary widely depending on method and chain - #[instrument(level = "trace")] pub fn new(method: &str, chain_id: u64, response_bytes: u64) -> Self { // TODO: this works, but this is fragile. think of a better way to check the method is a subscription if method.ends_with(')') { @@ -180,7 +179,6 @@ impl ComputeUnit { } /// notifications and subscription responses cost per-byte - #[instrument(level = "trace")] pub fn variable_price + std::fmt::Debug>( chain_id: u64, method: &str, @@ -199,7 +197,6 @@ impl ComputeUnit { /// Compute cost per request /// All methods cost the same /// The number of bytes are based on input, and output bytes - #[instrument(level = "trace")] pub fn cost( &self, archive_request: bool, diff --git a/web3_proxy/src/rpcs/consensus.rs b/web3_proxy/src/rpcs/consensus.rs index 4d850141..31be0153 100644 --- a/web3_proxy/src/rpcs/consensus.rs +++ b/web3_proxy/src/rpcs/consensus.rs @@ -23,7 +23,7 @@ use std::time::Duration; use tokio::select; use tokio::task::yield_now; use tokio::time::{sleep_until, Instant}; -use tracing::{debug, enabled, error, info, instrument, trace, warn, Level}; +use tracing::{debug, enabled, error, info, trace, warn, Level}; #[derive(Constructor, Clone, Copy, Debug, Default, Eq, PartialEq, Serialize)] pub struct RpcRanking { @@ -874,7 +874,6 @@ fn best_rpc<'a>(rpc_a: &'a Arc, rpc_b: &'a Arc) -> &'a Arc impl Stream { stream! { trace!("entered stream");