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

Add additional subscription metrics #18071

Merged
merged 1 commit into from
Jun 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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