-
Notifications
You must be signed in to change notification settings - Fork 49
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: switch to metrics_derive #832
Conversation
d07ebca
to
298870f
Compare
crates/pool/src/mempool/uo_pool.rs
Outdated
#[derive(Metrics)] | ||
#[metrics(scope = "op_pool")] | ||
struct UoPoolMetricsEPSpecific { | ||
#[metric(describe = "the number of ops seen.")] | ||
ops_seen: Gauge, | ||
#[metric(describe = "the number of unmined ops.")] | ||
unmined_operations: Counter, | ||
#[metric(describe = "the number of removed ops.")] | ||
removed_operations: Counter, | ||
#[metric(describe = "the number of removed entities.")] | ||
removed_entities: Counter, | ||
} | ||
|
||
fn current_base_fee(fee: f64) { | ||
metrics::gauge!("op_pool_current_base_fee").set(fee); | ||
} | ||
#[derive(Metrics)] | ||
#[metrics(scope = "op_pool")] | ||
struct UoPoolMetrics { | ||
#[metric(describe = "the maximum fee in Gwei.")] | ||
current_max_fee_gwei: Gauge, | ||
#[metric(describe = "the maximum priority fee in Gwei.")] | ||
current_max_priority_fee_gwei: Gauge, | ||
#[metric(describe = "the base fee of current block.")] | ||
current_base_fee: Gauge, | ||
} |
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.
What do you think about simplifying this into a single struct and just handling the duplication of the fees in dashboards?
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.
that might confuse who don't familiar the metric setup. they might find the value doubled (for 2 EPs we supportted.)
8c9e405
to
9ab1dfd
Compare
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.
🚢
[Closes/Fixes] #166
Proposed Changes