mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Get blobs v2 metrics (#8641)
N/A Add standardized metrics for getBlobsV2 from https://github.com/ethereum/beacon-metrics/pull/14. Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
This commit is contained in:
@@ -247,6 +247,12 @@ async fn fetch_and_process_blobs_v2<T: BeaconChainTypes>(
|
||||
|
||||
metrics::observe(&metrics::BLOBS_FROM_EL_EXPECTED, num_expected_blobs as f64);
|
||||
debug!(num_expected_blobs, "Fetching blobs from the EL");
|
||||
|
||||
// Track request count and duration for standardized metrics
|
||||
inc_counter(&metrics::BEACON_ENGINE_GET_BLOBS_V2_REQUESTS_TOTAL);
|
||||
let _timer =
|
||||
metrics::start_timer(&metrics::BEACON_ENGINE_GET_BLOBS_V2_REQUEST_DURATION_SECONDS);
|
||||
|
||||
let response = chain_adapter
|
||||
.get_blobs_v2(versioned_hashes)
|
||||
.await
|
||||
@@ -254,6 +260,11 @@ async fn fetch_and_process_blobs_v2<T: BeaconChainTypes>(
|
||||
inc_counter(&metrics::BLOBS_FROM_EL_ERROR_TOTAL);
|
||||
})?;
|
||||
|
||||
drop(_timer);
|
||||
|
||||
// Track successful response
|
||||
inc_counter(&metrics::BEACON_ENGINE_GET_BLOBS_V2_RESPONSES_TOTAL);
|
||||
|
||||
let Some(blobs_and_proofs) = response else {
|
||||
debug!(num_expected_blobs, "No blobs fetched from the EL");
|
||||
inc_counter(&metrics::BLOBS_FROM_EL_MISS_TOTAL);
|
||||
|
||||
Reference in New Issue
Block a user