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

feat: expose ChainSpec metrics #10737

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

plaflamme
Copy link
Contributor

This adds a new ChainSpecInfo struct that can be used to expose static ChainSpec metrics. The primary goal of this is to add the chain's name to the Grafana dashboard, but potentially other labels derived from ChainSpec could also be exported.

Comment on lines +5 to +6
#[derive(Debug, Clone)]
pub struct ChainSpecInfo {
Copy link
Collaborator

@onbjerg onbjerg Sep 6, 2024

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

Copy link
Contributor Author

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.

@mattsse mattsse added C-enhancement New feature or request A-observability Related to tracing, metrics, logs and other observability tools labels Sep 6, 2024
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.
@plaflamme
Copy link
Contributor Author

@onbjerg not sure why the assertion is failing. I removed it, but see 8a494ec for more details

@onbjerg onbjerg enabled auto-merge September 10, 2024 10:23
@onbjerg onbjerg added this pull request to the merge queue Sep 10, 2024
Merged via the queue into paradigmxyz:main with commit 2985720 Sep 10, 2024
34 checks passed
@plaflamme plaflamme deleted the feat-chain-spec-metric branch September 14, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-observability Related to tracing, metrics, logs and other observability tools C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants