Record v2 beacon blocks http api metrics separately (#7692)

This PR adds v2 beacon block paths to the function that records http api usage, so they don't just get recorded as "/v2/beacon" like below:

<img width="934" alt="image" src="https://github.com/user-attachments/assets/8b669f0a-2821-46ee-a30a-0e344d3e63c1" />
This commit is contained in:
Jimmy Chen
2025-07-02 18:47:35 +10:00
committed by GitHub
parent a459a9af98
commit b35854b71f

View File

@@ -211,9 +211,11 @@ pub fn prometheus_metrics() -> warp::filters::log::Log<impl Fn(warp::filters::lo
// First line covers `POST /v1/beacon/blocks` only
equals("v1/beacon/blocks")
.or_else(|| starts_with("v2/beacon/blocks"))
.or_else(|| starts_with("v1/beacon/blob_sidecars"))
.or_else(|| starts_with("v1/beacon/blocks/head/root"))
.or_else(|| starts_with("v1/beacon/blinded_blocks"))
.or_else(|| starts_with("v2/beacon/blinded_blocks"))
.or_else(|| starts_with("v1/beacon/headers"))
.or_else(|| starts_with("v1/beacon/light_client"))
.or_else(|| starts_with("v1/beacon/pool/attestations"))