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(rpc/validation): Expose metric for validation disallow list size. #14057

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

ryanschneider
Copy link
Contributor

For compliance reasons it's desirable to have a metric for the validation API's disallow list size (for example an infra provider can setup an alert on this metric if it's 0 or lower than expected as it might indicate the disallow list is misconfigured).

Example metric output:

# HELP reth_builder_validation_disallow_size The number of entries configured in the builder validation disallow list
# TYPE reth_builder_validation_disallow_size gauge
reth_builder_validation_disallow_size 1

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just adds an additional metric so even if this is never changed it should be fine

Comment on lines +547 to +549
#[derive(Metrics)]
#[metrics(scope = "builder.validation")]
pub(crate) struct ValidationMetrics {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a smol note here why this exists

});

inner.metrics.disallow_size.set(disallow_size as f64);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer a oneliner here with inner.disallwo.len()

@mattsse mattsse added the A-observability Related to tracing, metrics, logs and other observability tools label Jan 29, 2025
@mattsse mattsse enabled auto-merge January 29, 2025 09:35
@mattsse mattsse added this pull request to the merge queue Jan 29, 2025
Merged via the queue into paradigmxyz:main with commit c7152ee Jan 29, 2025
44 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants