Skip to content

feat(preconf): add observability metrics for sequencer and validator flows#3084

Draft
fridrik01 wants to merge 1 commit intopreconf-devfrom
add-preconf-metrics
Draft

feat(preconf): add observability metrics for sequencer and validator flows#3084
fridrik01 wants to merge 1 commit intopreconf-devfrom
add-preconf-metrics

Conversation

@fridrik01
Copy link
Copy Markdown
Contributor

This PR adds observability metrics for preconf sequencer/validator flows:

  • Sequencer-side: request outcomes, proposer-check results
  • Validator-side: fetch outcomes, fallback reasons, sequencer-available gauge
  • Blockchain: round-change counter
  • Internal errors now return 500 (was 404) so HTTP status matches the metric label

@fridrik01 fridrik01 self-assigned this Apr 17, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 37.03704% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.83%. Comparing base (cd11467) to head (6cd2b87).

Files with missing lines Patch % Lines
beacon/validator/block_builder.go 0.00% 28 Missing ⚠️
beacon/validator/preconf_metrics.go 16.66% 10 Missing ⚠️
beacon/preconf/server.go 79.16% 5 Missing ⚠️
beacon/validator/service.go 50.00% 2 Missing and 1 partial ⚠️
beacon/blockchain/metrics.go 0.00% 2 Missing ⚠️
beacon/blockchain/round_change.go 0.00% 2 Missing ⚠️
node-core/components/preconf_server.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           preconf-dev    #3084      +/-   ##
===============================================
- Coverage        58.93%   58.83%   -0.10%     
===============================================
  Files              379      381       +2     
  Lines            19531    19603      +72     
===============================================
+ Hits             11511    11534      +23     
- Misses            7058     7106      +48     
- Partials           962      963       +1     
Files with missing lines Coverage Δ
beacon/preconf/server_metrics.go 100.00% <100.00%> (ø)
node-core/components/preconf_server.go 22.22% <0.00%> (-0.64%) ⬇️
beacon/blockchain/metrics.go 81.39% <0.00%> (-3.98%) ⬇️
beacon/blockchain/round_change.go 0.00% <0.00%> (ø)
beacon/validator/service.go 89.65% <50.00%> (-10.35%) ⬇️
beacon/preconf/server.go 52.57% <79.16%> (+2.29%) ⬆️
beacon/validator/preconf_metrics.go 16.66% <16.66%> (ø)
beacon/validator/block_builder.go 48.61% <0.00%> (-4.08%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fridrik01 fridrik01 requested review from bar-bera and calbera April 17, 2026 11:43

// Preconf server payload request outcomes used as the `result` label on
// beacon_kit.preconf.server.payload_request_total.
const (
Copy link
Copy Markdown
Contributor

@calbera calbera Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could make this a typed string type ServerResult string and just have the value constants be OK, Unauthorized, etc..

fetchAndWritePayload would then return ServerResult

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