From b08524a3e8f21625599427c65374c2e99e395f04 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Fri, 18 Jun 2021 10:30:31 -0600 Subject: [PATCH] Add additional subscription metrics --- rpc/src/rpc_pubsub.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpc/src/rpc_pubsub.rs b/rpc/src/rpc_pubsub.rs index 9d9937237ee112..26fa61de563889 100644 --- a/rpc/src/rpc_pubsub.rs +++ b/rpc/src/rpc_pubsub.rs @@ -224,6 +224,8 @@ impl RpcSolPubSubImpl { debug!("Total existing subscriptions: {}", num_subscriptions); if num_subscriptions >= self.max_active_subscriptions { info!("Node subscription limit reached"); + datapoint_info!("rpc-subscription", ("total", num_subscriptions, i64)); + inc_new_counter_info!("rpc-subscription-refused-limit-reached", 1); Err(Error { code: ErrorCode::InternalError, message: "Internal Error: Subscription refused. Node subscription limit reached" @@ -231,6 +233,7 @@ impl RpcSolPubSubImpl { data: None, }) } else { + datapoint_info!("rpc-subscription", ("total", num_subscriptions + 1, i64)); Ok(()) } }