fuel-core
fuel-core copied to clipboard
Introduce txpool and p2p metrics
I changed the test to just scan for numbers rather than using manual checks for each metrics, as now at 40 items I felt it would be too exhaustive to manually check each one.
I would prefer if someone like @leviathanbeak could look over the gossip_sub metrics config as I wasn't sure what to put with it.
This PR reworks how metrics are done, while still using a global static variable to point to them, they are instead configured through the proffered library of prometheus_client, where the registries and their accompany counters are held. This requires the registry be held behind a Read/Write, although this should mostly be safe as the same registry will likely not have multiple counters attempted to registered onto it at once.
This close #680 and fixes part of #483, the original metrics do need to reworked into this new system as well in a subsequent PR. Also future work should hopefully break metrics back into a feature rather than just as a config option inside of each crate. Some of the design things are kind of weird so please suggest any changes/fixes and I will make them, but wanted to get an initial version to start tracking these metrics so that collection can begin while they are being improved
@ControlCplusControlV gossipsub/builder.rs file has been "removed" in favor of config.rs
Oh ok, will refactor using that then
@ControlCplusControlV
gossipsub/builder.rsfile has been "removed" in favor ofconfig.rs
Should use config.rs now and be integrated properly there