Skip to content

miner: add OpenTelemetry spans for block building path#33773

Merged
fjl merged 12 commits intoethereum:masterfrom
jrhea:rpc-otel-buildPayload
Mar 16, 2026
Merged

miner: add OpenTelemetry spans for block building path#33773
fjl merged 12 commits intoethereum:masterfrom
jrhea:rpc-otel-buildPayload

Conversation

@jrhea
Copy link
Copy Markdown
Contributor

@jrhea jrhea commented Feb 5, 2026

Instruments the block building path with OpenTelemetry tracing spans.

  • added spans in forkchoiceUpdated -> buildPayload -> background payload loop -> generateWork iterations. Spans should look something like this:
jsonrpc.engine/forkchoiceUpdatedV3
|- rpc.runMethod
|  |- engine.forkchoiceUpdated
|     |- miner.buildPayload [payload.id, parent.hash, timestamp]
|        |- miner.generateWork [txs.count, gas.used, fees] (empty block)
|        |  |- miner.prepareWork
|        |  |- miner.FinalizeAndAssemble
|        |     |- consensus.beacon.FinalizeAndAssemble [block.number, txs.count, withdrawals.count]
|        |        |- consensus.beacon.Finalize
|        |        |- consensus.beacon.IntermediateRoot
|        |        |- consensus.beacon.NewBlock
|        |- miner.background [block.number, iterations.total, exit.reason, empty.delivered]
|           |- miner.buildIteration [iteration, update.accepted]
|           |  |- miner.generateWork [txs.count, gas.used, fees]
|           |     |- miner.prepareWork
|           |     |- miner.fillTransactions [pending.plain.count, pending.blob.count]
|           |     |  |- miner.commitTransactions.priority (if prio txs exist)
|           |     |  |  |- miner.commitTransactions
|           |     |  |     |- miner.commitTransaction (per tx)
|           |     |  |- miner.commitTransactions.normal (if normal txs exist)
|           |     |     |- miner.commitTransactions
|           |     |        |- miner.commitTransaction (per tx)
|           |     |- miner.FinalizeAndAssemble
|           |        |- consensus.beacon.FinalizeAndAssemble [block.number, txs.count, withdrawals.count]
|           |           |- consensus.beacon.Finalize
|           |           |- consensus.beacon.IntermediateRoot
|           |           |- consensus.beacon.NewBlock
|           |- miner.buildIteration [iteration, update.accepted]
|           |  |- ...
|           |- ...

  • added simulated server spans in SimulatedBeacon.sealBlock so dev mode (geth --dev) produces traces that mirror production Engine API calls from a real consensus client.

jrhea

This comment was marked as resolved.

@jrhea jrhea marked this pull request as draft February 6, 2026 13:23
@jrhea jrhea marked this pull request as ready for review February 6, 2026 16:20
@jrhea jrhea force-pushed the rpc-otel-buildPayload branch from b99986f to 71bdf38 Compare February 10, 2026 17:22
@jrhea jrhea requested a review from s1na as a code owner February 13, 2026 17:06
@jrhea jrhea force-pushed the rpc-otel-buildPayload branch 5 times, most recently from b21de26 to aded446 Compare February 13, 2026 17:41
@jrhea jrhea force-pushed the rpc-otel-buildPayload branch from aded446 to b0e1879 Compare February 13, 2026 17:58
@jrhea jrhea force-pushed the rpc-otel-buildPayload branch from 2194fb9 to 09fce40 Compare February 14, 2026 19:43
@fjl fjl modified the milestone: 1.17.2 Mar 3, 2026
@jrhea jrhea force-pushed the rpc-otel-buildPayload branch from 1d07e02 to 56f9dde Compare March 3, 2026 16:16
@fjl fjl changed the title eth/catalyst, miner: add OpenTelemetry spans for block building path miner: add OpenTelemetry spans for block building path Mar 16, 2026
@fjl fjl merged commit 98b13f3 into ethereum:master Mar 16, 2026
8 of 9 checks passed
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