parity-ethereum
parity-ethereum copied to clipboard
Prometheus metrics
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 inClient
andEthSync
- Hyper server for serve metrics in
parity/metrics.rs
, metrics be accessed viahttp://...: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 rundocker-compose up
. - New snapshot creation status
.restoration_status()
, so renamed.status()
to.creation_status()
.
Looks good overall.
Consider making an optional feature flag for this. Also needs a clean rebase onto master.
@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 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.