mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
client/finality-grandpa: Add Prometheus metrics to GossipValidator (#5237)
* client/finality-grandpa: Add Prometheus metrics to GossipValidator
Instrument finality grandpa `GossipValidator` exposing count of messages
validated by message type and message action.
```
\# HELP substrate_finality_grandpa_communication_gossip_validator_messages Number of messages validated by the finality grandpa gossip validator.
\# TYPE substrate_finality_grandpa_communication_gossip_validator_messages counter
substrate_finality_grandpa_communication_gossip_validator_messages{action="discard",message="neighbor"} 39
substrate_finality_grandpa_communication_gossip_validator_messages{action="keep",message="vote"} 28
```
* client/finality-grandpa: Add None as Prometheus registry in tests
* client/finality-granpda/src/communication: Refactor metric registration
This commit is contained in:
@@ -1220,6 +1220,7 @@ fn voter_persists_its_votes() {
|
||||
net.lock().peers[1].network_service().clone(),
|
||||
config.clone(),
|
||||
set_state,
|
||||
None,
|
||||
);
|
||||
|
||||
let (round_rx, round_tx) = network.round_communication(
|
||||
@@ -1616,6 +1617,7 @@ fn grandpa_environment_respects_voting_rules() {
|
||||
network_service.clone(),
|
||||
config.clone(),
|
||||
set_state.clone(),
|
||||
None,
|
||||
);
|
||||
|
||||
Environment {
|
||||
|
||||
Reference in New Issue
Block a user