parity-ethereum icon indicating copy to clipboard operation
parity-ethereum copied to clipboard

Prometheus metrics

Open adria0 opened this issue 3 years ago • 3 comments

Implements #11725

  • Updates rust version to 2018, uses async
  • Uses tokio-runtime 0.1.2 with tokio 0.2 backend.
  • New trait PrometheusMetrics implemented it in Client and EthSync
  • Hyper server for serve metrics in parity/metrics.rs, metrics be accessed via http://...:3000/metrics, only for full client (not implemented for light client)
  • Command line flags for metrics, disabled by default, port and interface can be configurated
  • Docker-compose for starting the client with metrics in scripts/prometheus, contains grafana/prometheus visualization. Go to the folder and run docker-compose up.
  • New snapshot creation status .restoration_status() , so renamed .status() to .creation_status().

adria0 avatar Jul 17 '20 18:07 adria0

Looks good overall.

Consider making an optional feature flag for this. Also needs a clean rebase onto master.

vorot93 avatar Jul 17 '20 18:07 vorot93

@sorpaas Not everyone needs prometheus metrics. Therefore it would be a good idea to make this a cargo feature which we could enable by default.

vorot93 avatar Jul 29 '20 20:07 vorot93

@vorot93 I honestly think it's not easy to do that. A lot of the prometheus changes require additional parameters to be set. And if we use flag for that I believe it might be really complicated.

Always building prometheus might result in slightly larger binary size, but other than that, as long as the service can be disabled runtime, it wouldn't bring any noticeable performance penalty. The prometheus service is also enabled in Substrate by default.

sorpaas avatar Jul 29 '20 20:07 sorpaas