Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace prometheus client with the official one #2956

Open
ackintosh opened this issue Jan 25, 2022 · 5 comments
Open

Replace prometheus client with the official one #2956

ackintosh opened this issue Jan 25, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ackintosh
Copy link
Member

Description

Prometheus team have released an official Prometheus instrumentation library for Rust.

https://github.com/prometheus/client_rust

We're not having any problems with the current client for now, however, I believe we would take benefits from the official one. ref: tikv/rust-prometheus#392

@paulhauner paulhauner added the enhancement New feature or request label Feb 7, 2022
@ackintosh
Copy link
Member Author

ackintosh commented Feb 8, 2022

In lighthouse, the client is used to:

  1. provide metrics endpoint for Prometheus HTTP server, in OpenMetrics specification.
  • beacon_node/http_metrics crate
  • validator_client/http_metrics crate
  1. send BeaconNode/Validator metrics to custom endpoint (e.g. beaconcha.in), in "JSON".
  • monitoring_api crate

The metrics is defined as Ethereum consensus client metrics and Beacon chain metrics.

@mxinden
Copy link

mxinden commented Feb 15, 2022

👋 libp2p and prometheus-client maintainer here.

Another benefit would be dependency consolidation. libp2p uses prometheus-client and in turn the lighthouse network stack uses prometheus-client.

@ackintosh
Copy link
Member Author

📝 I'm working on prometheus/client_rust#47. This makes the client able to do our the 2. use case I've mentioned here.

@ackintosh
Copy link
Member Author

📝 I found out that lighthouse is using HistogramTimer, which is timer to measure and record the duration of an event. (e.g. here)

For now, if I understand correctly, the official client doesn’t have a functionality equivalent to HistogramTimer.

@mxinden
Copy link

mxinden commented Apr 5, 2022

I find HistogramTimer a need feature of the prometheus crate. I think it is worth proposing it to the prometheus-client crate @ackintosh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants