rpc-v2/metrics: Align RPC metrics with tx pool metrics#10105
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
|
/cmd prdoc --audience node_dev --bump patch |
…e_dev --bump patch'
|
|
||
| /// Histogram of timings for reporting `Broadcast` event. | ||
| pub fn broadcast(name: &'static str, label: &'static str) -> Result<Histogram, PrometheusError> { | ||
| Histogram::with_opts(histogram_opts!(name, label, linear_buckets(0.01, 0.25, 16).unwrap())) |
There was a problem hiding this comment.
Does this mean the first bucket is (-Inf .. 0.01)? Is it intentional, or it should be linear_buckets(0, 0.25, 16)?
There was a problem hiding this comment.
I would may be even write it as linear_buckets(0.25, 0.25, 16) to not waste a bucket on (-Inf .. 0), because there is no negative timings and bucket (-Inf .. 0.25) is essentially (0 .. 0.25). But this applies to other histograms as well.
There was a problem hiding this comment.
And, honestly, I don't know how the histograms are rendered in the UI, and if it makes sense visualization-wise.
There was a problem hiding this comment.
Im not entirely familiar with the reliability buckets 🤔 Maybe @michalkucharczyk or @olliecorbisiero could provide better answers
There was a problem hiding this comment.
@dmitry-markin @lexnv do the buckets I outlined in issue #10067 help clear things up?
There was a problem hiding this comment.
I would leave it as is.
| @@ -0,0 +1,97 @@ | |||
| // This file is part of Substrate. | |||
There was a problem hiding this comment.
maybe metric_buckets.rs (or shared_metric_buckets.rs) would be a better name for this file?
There was a problem hiding this comment.
or timing_metric_buckets.rs ?
| histogram_opts!(name, label).buckets( | ||
| [ | ||
| linear_buckets(0.0, 3.0, 20).unwrap(), | ||
| // requested in PR 9158 |
There was a problem hiding this comment.
| // requested in PR 9158 | |
| // requested in PR #9158 |
This PR syncs the tx pool metrics with the RPC layer metrics.
The TX Pool metrics are re-exported under a
histogrammodule, such that the RPC layer can reuse the same settings. This ensures that the RPC will be in sync with the Tx Pool metrics for the reliability dashboards.Closes: #10067