From eb3fe0b1b5d65e79744b8cdc37d42b3585c27705 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 6 Jan 2023 14:02:06 -0800 Subject: [PATCH] start moving more stats from /status to /prometheus --- web3_proxy/src/app/mod.rs | 7 +++++++ web3_proxy/src/frontend/status.rs | 9 +-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index 436cbb68..92597cb0 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -870,6 +870,13 @@ impl Web3ProxyApp { } }; + // app.pending_transactions.sync(); + // app.rpc_secret_key_cache.sync(); + // "pending_transactions_count": app.pending_transactions.entry_count(), + // "pending_transactions_size": app.pending_transactions.weighted_size(), + // "user_cache_count": app.rpc_secret_key_cache.entry_count(), + // "user_cache_size": app.rpc_secret_key_cache.weighted_size(), + #[derive(Serialize)] struct CombinedMetrics<'a> { app: &'a Web3ProxyAppMetrics, diff --git a/web3_proxy/src/frontend/status.rs b/web3_proxy/src/frontend/status.rs index e18d60c5..714dab9e 100644 --- a/web3_proxy/src/frontend/status.rs +++ b/web3_proxy/src/frontend/status.rs @@ -32,16 +32,9 @@ pub async fn status( ) -> impl IntoResponse { let body = response_cache .get_with(FrontendResponseCaches::Status, async { - app.pending_transactions.sync(); - app.rpc_secret_key_cache.sync(); - - // TODO: what else should we include? uptime, cache hit rates, cpu load + // TODO: what else should we include? uptime, cache hit rates, cpu load, memory used let body = json!({ "chain_id": app.config.chain_id, - "pending_transactions_count": app.pending_transactions.entry_count(), - "pending_transactions_size": app.pending_transactions.weighted_size(), - "user_cache_count": app.rpc_secret_key_cache.entry_count(), - "user_cache_size": app.rpc_secret_key_cache.weighted_size(), "balanced_rpcs": app.balanced_rpcs, "private_rpcs": app.private_rpcs, });