Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Add additional subscription metrics (#18071)
Browse files Browse the repository at this point in the history
(cherry picked from commit 83a6c66)
  • Loading branch information
CriesofCarrots authored and mergify-bot committed Jun 18, 2021
1 parent c330016 commit 1d480e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpc/src/rpc_pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,16 @@ 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"
.into(),
data: None,
})
} else {
datapoint_info!("rpc-subscription", ("total", num_subscriptions + 1, i64));
Ok(())
}
}
Expand Down

0 comments on commit 1d480e6

Please sign in to comment.