Skip to content

app: add addr label to beacon node version - #4847

Merged
KaloyanTanev merged 4 commits into
mainfrom
oisin/eth2-per-bn-metrics
Nov 18, 2026
Merged

KaloyanTanev merged 4 commits into
mainfrom
oisin/eth2-per-bn-metrics

Conversation

@OisinKyne

@OisinKyne OisinKyne commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds an addr label to app_beacon_node_version. Its value is the redacted beacon node address that the SSE metrics already use for their addr label.

The SSE metrics already measure each beacon node separately, labelled by addr:

  • app_beacon_node_sse_head_delay
  • app_beacon_node_sse_block_processing_time

The version gauge only has beacon_id, the beacon node's libp2p peer ID, which the SSE metrics don't carry. So when a node has several beacon nodes, there's no way to tell which client is the slow one without matching log lines to addresses by hand. With addr on both, one query does it:

histogram_quantile(0.9, sum by (addr, le) (rate(app_beacon_node_sse_head_delay_bucket[1h])))
  * on (addr) group_left(version) app_beacon_node_version

The label uses log.RedactURL(addr, true), so values and redaction are exactly the same as the existing SSE labels. Cardinality is bounded by the configured --beacon-node-endpoints.

category: feature
ticket: none

… label

Adds app_eth2_bn_requests_total, app_eth2_bn_errors_total and
app_eth2_bn_first_total with endpoint and addr labels, recorded per beacon
node inside provide, and an addr label on app_beacon_node_version.

eth2wrap.BeaconNodeLabel keeps only scheme://host[:port], truncates to 64
characters, suffixes collisions with #n and caps distinct values at 16
(then "other"). The SSE listener uses it for its existing addr label so
values join across metrics. Existing app_eth2_* metrics are unchanged.

category: feature
ticket: none
@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.84%. Comparing base (89e4b00) to head (e2810b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4847   +/-   ##
=======================================
  Coverage   67.84%   67.84%           
=======================================
  Files         255      255           
  Lines       33846    33846           
=======================================
+ Hits        22963    22964    +1     
+ Misses      10882    10881    -1     
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OisinKyne OisinKyne changed the title app/eth2wrap: add per bn request metrics with bounded addresses app/eth2wrap: add per beacon node metrics with addr label Nov 17, 2026
@OisinKyne OisinKyne changed the title app/eth2wrap: add per beacon node metrics with addr label app: add a bounded addr label to beacon node version Nov 17, 2026
@OisinKyne OisinKyne changed the title app: add a bounded addr label to beacon node version app: add a bounded addr label to beacon node version Nov 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@OisinKyne OisinKyne changed the title app: add a bounded addr label to beacon node version app: add addr label to beacon node version Nov 17, 2026
@KaloyanTanev
KaloyanTanev merged commit c968e97 into main Nov 18, 2026
15 checks passed
@KaloyanTanev
KaloyanTanev deleted the oisin/eth2-per-bn-metrics branch November 18, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants