-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: expose ChainSpec
metrics
#10737
Conversation
This is mostly useful to expose the chain's name.
#[derive(Debug, Clone)] | ||
pub struct ChainSpecInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should use reth-metrics-derive
if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked into this one and I don't think it's possible. The thing is that this is a "fake" metric where we create a gauge
that is only used to set labels on it. The gauge
itself is never used. It doesn't look like reth-metrics-derive
supports this case.
Not sure why this assertion is failing. When running binary, the gauge is correctly registered and the metric correctly shows up when querying the endpoint. The `reth_version_info` gauge is also missing, so this isn't new. Probably caused by the testing infrastructure that's missing some component, not sure.
This adds a new
ChainSpecInfo
struct that can be used to expose staticChainSpec
metrics. The primary goal of this is to add the chain's name to the Grafana dashboard, but potentially other labels derived fromChainSpec
could also be exported.