mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 03:47:57 +00:00
Add more prometheus metrics to network::Protocol. (#5145)
This commit is contained in:
@@ -210,7 +210,8 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
|
||||
params.finality_proof_request_builder,
|
||||
params.protocol_id.clone(),
|
||||
peerset_config,
|
||||
params.block_announce_validator
|
||||
params.block_announce_validator,
|
||||
params.metrics_registry.as_ref()
|
||||
)?;
|
||||
|
||||
// Build the swarm.
|
||||
@@ -858,7 +859,7 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
|
||||
};
|
||||
|
||||
this.is_major_syncing.store(is_major_syncing, Ordering::Relaxed);
|
||||
|
||||
|
||||
if let Some(metrics) = this.metrics.as_ref() {
|
||||
metrics.is_major_syncing.set(is_major_syncing as u64);
|
||||
metrics.peers_count.set(num_connected_peers as u64);
|
||||
|
||||
Reference in New Issue
Block a user