c3e5053612
## Issue Addressed NA ## Proposed Changes When producing a block from a builder, there are two points where we could consider the block "broadcast": 1. When the blinded block is published to the builder. 2. When the un-blinded block is published to the P2P network (this is always *after* the previous step). Our logging for late block broadcasts was using (2) for builder-blocks, which was creating a lot of false-positive logs. This is because the builder publishes the block on the P2P network themselves before returning it to us and we perform (2). For clarity, the logs were false-positives because we claim that the block was published late by us when it was actually published earlier by the builder. This PR changes our logging behavior so we do our logging at (1) instead. It also updates our metrics for block broadcast to distinguish between local and builder blocks. I believe the metrics change will be natively compatible with existing Grafana dashboards. ## Additional Info One could argue that the builder *should* return the block to us faster, however that's not the case. I think it's more important that we don't desensitize users with false-positives.
46 lines
2.1 KiB
Rust
46 lines
2.1 KiB
Rust
pub use lighthouse_metrics::*;
|
|
|
|
lazy_static::lazy_static! {
|
|
pub static ref HTTP_API_PATHS_TOTAL: Result<IntCounterVec> = try_create_int_counter_vec(
|
|
"http_api_paths_total",
|
|
"Count of HTTP requests received",
|
|
&["path"]
|
|
);
|
|
pub static ref HTTP_API_STATUS_CODES_TOTAL: Result<IntCounterVec> = try_create_int_counter_vec(
|
|
"http_api_status_codes_total",
|
|
"Count of HTTP status codes returned",
|
|
&["status"]
|
|
);
|
|
pub static ref HTTP_API_PATHS_TIMES: Result<HistogramVec> = try_create_histogram_vec(
|
|
"http_api_paths_times",
|
|
"Duration to process HTTP requests per path",
|
|
&["path"]
|
|
);
|
|
|
|
pub static ref HTTP_API_BEACON_PROPOSER_CACHE_TIMES: Result<Histogram> = try_create_histogram(
|
|
"http_api_beacon_proposer_cache_build_times",
|
|
"Duration to process HTTP requests per path",
|
|
);
|
|
pub static ref HTTP_API_BEACON_PROPOSER_CACHE_HITS_TOTAL: Result<IntCounter> = try_create_int_counter(
|
|
"http_api_beacon_proposer_cache_hits_total",
|
|
"Count of times the proposer cache has been hit",
|
|
);
|
|
pub static ref HTTP_API_BEACON_PROPOSER_CACHE_MISSES_TOTAL: Result<IntCounter> = try_create_int_counter(
|
|
"http_api_beacon_proposer_cache_misses_total",
|
|
"Count of times the proposer cache has been missed",
|
|
);
|
|
pub static ref HTTP_API_BLOCK_BROADCAST_DELAY_TIMES: Result<HistogramVec> = try_create_histogram_vec(
|
|
"http_api_block_broadcast_delay_times",
|
|
"Time between start of the slot and when the block was broadcast",
|
|
&["provenance"]
|
|
);
|
|
pub static ref HTTP_API_BLOCK_PUBLISHED_LATE_TOTAL: Result<IntCounter> = try_create_int_counter(
|
|
"http_api_block_published_late_total",
|
|
"The count of times a block was published beyond more than half way to the attestation deadline"
|
|
);
|
|
pub static ref HTTP_API_BLOCK_PUBLISHED_VERY_LATE_TOTAL: Result<IntCounter> = try_create_int_counter(
|
|
"http_api_block_published_very_late_total",
|
|
"The count of times a block was published beyond the attestation deadline"
|
|
);
|
|
}
|