Skip to content

metrics: instrument flashblock build and wait-for-next-tick by index#388

Open
teddyknox wants to merge 1 commit intoflashbots:mainfrom
teddyknox:teddy/flashblock-metrics
Open

metrics: instrument flashblock build and wait-for-next-tick by index#388
teddyknox wants to merge 1 commit intoflashbots:mainfrom
teddyknox:teddy/flashblock-metrics

Conversation

@teddyknox
Copy link

@teddyknox teddyknox commented Feb 12, 2026

Summary

  • Add per-flashblock-index histogram for build duration (op_rbuilder_flashblock_build_duration_by_index)
  • Add per-flashblock-index histogram for wait-to-next-tick slack (op_rbuilder_flashblock_wait_for_next_tick_duration)

Test plan

  • cargo check -p op-rbuilder passes
  • Verify metrics are emitted correctly in a test environment

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 12, 2026 22:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds additional flashblock-related metrics to improve observability by tracking build latency and emission counts segmented by flashblock index.

Changes:

  • Record a per-flashblock-index histogram for flashblock build duration (op_rbuilder_flashblock_build_duration_seconds_by_index).
  • Record a per-flashblock-index counter for emitted flashblocks (op_rbuilder_flashblock_emitted_total).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@teddyknox teddyknox force-pushed the teddy/flashblock-metrics branch from 3df0ad6 to 181f427 Compare February 12, 2026 23:05
Copilot AI review requested due to automatic review settings February 12, 2026 23:10
@teddyknox teddyknox force-pushed the teddy/flashblock-metrics branch from 181f427 to f52ff56 Compare February 12, 2026 23:10
@teddyknox teddyknox force-pushed the teddy/flashblock-metrics branch from f52ff56 to 5f029ed Compare February 12, 2026 23:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

crates/op-rbuilder/src/metrics.rs:87

  • The PR description does not mention the addition of wait-for-next-tick metrics, but the code adds three new wait-related metrics: flashblock_wait_for_next_tick_duration (histogram), flashblock_wait_for_next_tick_gauge (gauge), and op_rbuilder_flashblock_wait_for_next_tick_duration_by_index (histogram). Consider updating the PR description to accurately reflect all metrics being added.
    /// Histogram of the time taken to sync a Flashblock
    pub flashblock_sync_duration: Histogram,
    /// Flashblock UTF8 payload byte size histogram
    pub flashblock_byte_size_histogram: Histogram,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@teddyknox teddyknox changed the title metrics: instrument flashblock build duration and emitted count by index metrics: instrument flashblock build and wait-for-next-tick by index Feb 12, 2026
@SozinM
Copy link
Collaborator

SozinM commented Feb 13, 2026

@teddyknox reth recently merged changes to metrics paradigmxyz/reth#20232
Now we could create histogram with custom buckets (and labels)
Maybe this could be used to improve this metrics

@teddyknox teddyknox force-pushed the teddy/flashblock-metrics branch from 5f029ed to 6a0b6d4 Compare February 13, 2026 13:57
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