fuel-core icon indicating copy to clipboard operation
fuel-core copied to clipboard

Introduce txpool and p2p metrics

Open ControlCplusControlV opened this issue 3 years ago • 4 comments

ControlCplusControlV avatar Oct 22 '22 00:10 ControlCplusControlV

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 avatar Oct 24 '22 02:10 ControlCplusControlV

@ControlCplusControlV gossipsub/builder.rs file has been "removed" in favor of config.rs

leviathanbeak avatar Oct 24 '22 16:10 leviathanbeak

Oh ok, will refactor using that then

ControlCplusControlV avatar Oct 24 '22 16:10 ControlCplusControlV

@ControlCplusControlV gossipsub/builder.rs file has been "removed" in favor of config.rs

Should use config.rs now and be integrated properly there

ControlCplusControlV avatar Oct 25 '22 03:10 ControlCplusControlV