Phase 1b: Telemetry infrastructure — core library, build system, Docker stack#6437
Draft
pratikmankawde wants to merge 1 commit intopratik/otel-phase1a-plan-docsfrom
Draft
Phase 1b: Telemetry infrastructure — core library, build system, Docker stack#6437pratikmankawde wants to merge 1 commit intopratik/otel-phase1a-plan-docsfrom
pratikmankawde wants to merge 1 commit intopratik/otel-phase1a-plan-docsfrom
Conversation
2 tasks
This was referenced Feb 26, 2026
8794ef9 to
a6a6a7c
Compare
Add the OpenTelemetry telemetry library and supporting infrastructure: Build system: - Conan opentelemetry-cpp dependency with OTLP/gRPC exporter - CMake integration for xrpl_telemetry library target - Levelization ordering updates Core library (libxrpl): - Telemetry class: provider lifecycle, span creation, sampling config - SpanGuard: RAII span management with attribute/exception helpers - TelemetryConfig: parse [telemetry] config section - NullTelemetry: no-op implementation when telemetry is disabled Application integration: - Telemetry member in ApplicationImp with start/stop lifecycle - getTelemetry() interface on Application - ServiceRegistry telemetry accessor Docker observability stack: - OTel Collector, Jaeger, Grafana docker-compose setup - Collector config with OTLP gRPC receiver and Jaeger exporter Config and docs: - Example telemetry config section in xrpld-example.cfg - Build documentation for telemetry setup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
85325af to
252a4bb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## pratik/otel-phase1a-plan-docs #6437 +/- ##
===============================================================
Coverage ? 79.7%
===============================================================
Files ? 851
Lines ? 67872
Branches ? 7589
===============================================================
Hits ? 54096
Misses ? 13776
Partials ? 0
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Add the core OpenTelemetry telemetry library, build system integration, Docker observability stack, and Application-level lifecycle management. This provides the foundational infrastructure that all subsequent tracing phases build upon.
Stacked PR chain: PR #6436 (Phase 1a) → Phase 1b (this) → [Phase 1c: RPC integration] → PR #6424 → PR #6425 → PR #6426 → PR #6427
Context of Change
Implements the telemetry subsystem as a
libxrpllibrary component with a clean separation between the tracing API and the OpenTelemetry SDK. The design uses:XRPL_ENABLE_TELEMETRY) — zero overhead when disabled[telemetry]section in rippled config for endpoint, sampling, feature flagsThe Docker stack (OTel Collector → Jaeger → Grafana) provides a local development environment for visualizing traces.
Design doc:
OpenTelemetryPlan/directory.Type of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)Before / After
Before: No telemetry or tracing infrastructure exists in rippled.
After: rippled gains a
Telemetrysubsystem accessible viaapp.getTelemetry(). Whentelemetry=ONis set in the Conan build and[telemetry]is configured, spans are exported via OTLP/gRPC to an OpenTelemetry Collector. When disabled, all telemetry calls are no-ops.Key files:
include/xrpl/telemetry/Telemetry.h— public API (startSpan, sampling predicates)include/xrpl/telemetry/SpanGuard.h— RAII span wrappersrc/libxrpl/telemetry/Telemetry.cpp— OTel SDK setup, provider lifecyclesrc/libxrpl/telemetry/NullTelemetry.cpp— no-op fallbacksrc/xrpld/app/main/Application.cpp— lifecycle integration (init, start, stop)Next Tasks