Add fork choice write lock tracing context#9306
Conversation
13fb58f to
5182232
Compare
5182232 to
2612423
Compare
|
Have you done any monitoring of a live node to see whether these spans are working/informative? |
|
@michaelsproul will run it now and have it test. |
|
I validated this on a running local node rather than only from tests. I used a reduced Kurtosis setup in WSL with 2 Lighthouse CL nodes, 2 Geth EL nodes, and Tempo, then confirmed the spans from trace details via I was able to observe these spans on a healthy local live run:
The remaining span, With that harness in place, I was also able to observe:
So the precise summary is:
Relevant code anchors for the span definitions:
One tooling note: in this setup, |
PR #9306 Runtime Validation (local running node)setupWSL validation methodchild spans confirmed from: note: span matrix[OK] payload_envelope_import_fork_choice_update [OK] valid_payload_fork_choice_update [OK] finalization_fork_choice_prune [OK] invalid_payload_fork_choice_update bottom line3 / 4 spans were observed on a healthy local live run. |
Issue Addressed
Part of #8147.
Proposed Changes
Adds source-specific tracing spans around production fork-choice write-lock/update paths so lock wait spans have useful parent context in traces.
This is intentionally behavior-neutral:
Covered paths include block import, payload envelope import, attestation/slashing application, recompute-head, finalization prune, and execution payload validity updates.
The instrumentation uses a frequency-aware span level split:
info_span!so parent/source context is visible alongside the existing default#[instrument]fork-choice write-lock span in info-level tracing configurationsdebug_span!to avoid adding info-level trace noise on gossip-heavy pathsAdditional Info
This follows the instrumentation-first direction discussed in #8147.
Verifications Performed
cargo fmt --checkcargo check -p beacon_chaingit diff --check