mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Task 8.1: Inject trace_id/span_id into Logs::format() when an active OTel span exists, guarded by #ifdef XRPL_ENABLE_TELEMETRY. Uses thread-local GetSpan()/GetContext() with <10ns overhead per call. Task 8.2: Add Grafana Loki service (grafana/loki:2.9.0) to the Docker Compose stack with port 3100 exposed. Add Loki as a dependency for otel-collector and grafana services. Task 8.3: Add filelog receiver to OTel Collector config to tail rippled debug.log files with regex_parser extracting timestamp, partition, severity, trace_id, span_id, and message fields. Add loki exporter and logs pipeline. Mount rippled log directory into collector container. Task 8.4: Add tracesToLogs config in Tempo datasource provisioning pointing to Loki with filterByTraceID enabled, enabling one-click trace-to-log navigation in Grafana. Task 8.5: Add check_log_correlation() function to integration-test.sh that greps debug.log files for trace_id pattern and cross-checks the trace_id exists in Jaeger. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>