From 32156e981df59c49df878515032bfc7c7811bbea Mon Sep 17 00:00:00 2001 From: yenicelik Date: Sun, 25 Jun 2023 17:19:31 -0400 Subject: [PATCH] adding balances --- web3_proxy/src/stats/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/stats/mod.rs b/web3_proxy/src/stats/mod.rs index db7ea861..fe2a1c52 100644 --- a/web3_proxy/src/stats/mod.rs +++ b/web3_proxy/src/stats/mod.rs @@ -725,6 +725,8 @@ impl BufferedRpcQueryStats { // Read the latest balance ... let remaining = self.latest_balance.read().remaining(); + trace!("Remaining balance for influx is {:?}", remaining); + builder = builder .tag("archive_needed", key.archive_needed.to_string()) .tag("error_response", key.error_response.to_string()) @@ -744,13 +746,17 @@ impl BufferedRpcQueryStats { ) .field( "balance", - remaining.to_f64().context("balance is really (too) large")?, + remaining + .to_f64() + .context("balance is really (too) large")?, ); builder = builder.timestamp(key.response_timestamp); let point = builder.build()?; + trace!("Datapoint saving to Influx is {:?}", point); + Ok(point) } }