client/beefy: add more metrics for production visibility (#12910)

* few beefy metrics

* more beefy metrics

* some beefy metrics

* some beefy metrics

* more metrics

* other metrics

* fix tests

* merge changes

* Apply suggestions from code review

* client/beefy: fix metrics

* client/beefy: separate metrics per component, avoid double registering

* client/beefy: deduplicate metrics registration code

* remove unused metric

* impl review suggestions

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
dharjeezy
2023-02-16 13:45:57 +01:00
committed by GitHub
parent 4ff906860c
commit 292e5ee4e7
7 changed files with 316 additions and 49 deletions
+2 -1
View File
@@ -124,6 +124,7 @@ impl BeefyTestNet {
justif_protocol_name,
client,
_block: PhantomData,
metrics: None,
};
*net.peers[i].data.beefy_justif_req_handler.lock() = Some(justif_handler);
}
@@ -203,7 +204,7 @@ impl TestNetFactory for BeefyTestNet {
let api = Arc::new(TestApi::with_validator_set(&validator_set));
let inner = BlockImportAdapter::new(client.clone());
let (block_import, voter_links, rpc_links) =
beefy_block_import_and_links(inner, client.as_backend(), api);
beefy_block_import_and_links(inner, client.as_backend(), api, None);
let peer_data = PeerData {
beefy_rpc_links: Mutex::new(Some(rpc_links)),
beefy_voter_links: Mutex::new(Some(voter_links)),