Skip to content

Phase 4: Consensus tracing — round lifecycle, proposals, validations#6426

Draft
pratikmankawde wants to merge 1 commit intopratik/otel-phase3-tx-tracingfrom
pratik/otel-phase4-consensus-tracing
Draft

Phase 4: Consensus tracing — round lifecycle, proposals, validations#6426
pratikmankawde wants to merge 1 commit intopratik/otel-phase3-tx-tracingfrom
pratik/otel-phase4-consensus-tracing

Conversation

@pratikmankawde
Copy link
Collaborator

@pratikmankawde pratikmankawde commented Feb 25, 2026

PR Chain: #6436#6437#6438#6424#6425#6426 (this PR)#6427#6433 / #6439
Base: pratik/otel-phase3-tx-tracing

High Level Overview of Change

Add distributed tracing for the consensus round lifecycle. Instruments four key points in RCLConsensus::Adaptor: proposal sending, ledger close, ledger accept, and validation sending. Each span carries domain-specific attributes (ledger sequence, consensus mode, proposer count, round duration).

Context of Change

Phase 4 of the OpenTelemetry distributed tracing project. Consensus is the core protocol loop — understanding its timing and behavior is critical for network health monitoring. The instrumentation uses the XRPL_TRACE_CONSENSUS macro which compiles to ((void)0) when telemetry is disabled, ensuring zero overhead in production builds without the feature.

Spans and attributes:

  • consensus.proposal.send — round sequence
  • consensus.ledger_close — ledger sequence, consensus mode
  • consensus.accept — proposer count, round duration (ms)
  • consensus.validation.send — ledger sequence, proposing flag

Design doc: OpenTelemetryPlan/ directory in this repo.

Type of Change

  • New feature (non-breaking change which adds functionality)

API Impact

  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)

Test Plan

  • Build with telemetry=ON and verify xrpld links.
  • End-to-end: run a local network and verify consensus spans appear in Jaeger with correct attributes.
  • Verify span hierarchy: consensus.ledger_closeconsensus.accept.

Future Tasks

  • Phase 5: Observability dashboards, spanmetrics, and production deployment config

@pratikmankawde pratikmankawde added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Feb 25, 2026
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from a35616e to 04ddafd Compare February 25, 2026 22:12
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 4a96959 to 0ad5ca4 Compare February 25, 2026 22:13
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from 04ddafd to 9d7d59a Compare February 25, 2026 22:22
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 0ad5ca4 to 1f7808e Compare February 25, 2026 22:22
@pratikmankawde pratikmankawde added the DistributedTracingAndObservability Distributed Tracing And Observability related changes label Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.7%. Comparing base (f504d9b) to head (735ecd1).

Files with missing lines Patch % Lines
src/xrpld/app/consensus/RCLConsensus.cpp 72.7% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                       @@
##           pratik/otel-phase3-tx-tracing   #6426     +/-   ##
===============================================================
- Coverage                           79.7%   79.7%   -0.0%     
===============================================================
  Files                                851     851             
  Lines                              67941   67952     +11     
  Branches                            7587    7594      +7     
===============================================================
+ Hits                               54180   54184      +4     
- Misses                             13761   13768      +7     
Files with missing lines Coverage Δ
src/xrpld/app/consensus/RCLConsensus.cpp 59.6% <72.7%> (+0.3%) ⬆️

... and 2 files with indirect coverage changes

Impacted file tree graph

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

@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from 9d7d59a to c2ad81d Compare February 25, 2026 23:48
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 1f7808e to 3f240a3 Compare February 25, 2026 23:49
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from c2ad81d to 111e0cb Compare February 26, 2026 00:18
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 3f240a3 to 3402876 Compare February 26, 2026 00:18
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from 111e0cb to 858f391 Compare February 26, 2026 12:06
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 3402876 to 55bb221 Compare February 26, 2026 12:07
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from 751792d to 1a25348 Compare February 26, 2026 12:13
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 55bb221 to 4c67a5f Compare February 26, 2026 12:14
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from 1a25348 to b4d7297 Compare February 27, 2026 17:59
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 4c67a5f to 6e75849 Compare February 27, 2026 18:00
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from b4d7297 to 587d312 Compare February 27, 2026 18:06
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 6e75849 to 04e94ce Compare February 27, 2026 18:06
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase3-tx-tracing branch from 587d312 to f504d9b Compare February 27, 2026 18:16
@pratikmankawde pratikmankawde force-pushed the pratik/otel-phase4-consensus-tracing branch from 04e94ce to 735ecd1 Compare February 27, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DistributedTracingAndObservability Distributed Tracing And Observability related changes DraftRunCI Normally CI does not run on draft PRs. This opts in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant