Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network: Rename peerset metric to peerstore metric #6190

Open
lexnv opened this issue Oct 23, 2024 · 0 comments
Open

network: Rename peerset metric to peerstore metric #6190

lexnv opened this issue Oct 23, 2024 · 0 comments
Labels
T0-node This PR/Issue is related to the topic “node”.

Comments

@lexnv
Copy link
Contributor

lexnv commented Oct 23, 2024

The substrate_sub_libp2p_peerset_num_discovered corresponds to the PeerStoreMetric object and is reported by the peerstore itself, not by the peerset (protocol controller of notifications).

pub struct PeerStoreMetrics {
pub num_banned_peers: Gauge<U64>,
pub num_discovered: Gauge<U64>,
}
impl PeerStoreMetrics {
pub fn register(registry: &Registry) -> Result<Self, PrometheusError> {
Ok(Self {
num_banned_peers: prometheus::register(
Gauge::new(
"substrate_sub_libp2p_peerset_num_banned_peers",
"Number of banned peers stored in the peerset manager",
)?,
registry,
)?,
num_discovered: prometheus::register(
Gauge::new(
"substrate_sub_libp2p_peerset_num_discovered",
"Number of nodes stored in the peerset manager",
)?,
registry,
)?,
})
}
}

cc @paritytech/networking

@lexnv lexnv added the T0-node This PR/Issue is related to the topic “node”. label Oct 23, 2024
@lexnv lexnv added this to Networking Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
Status: No status
Development

No branches or pull requests

1 participant