diff --git a/docker/telemetry/TESTING.md b/docker/telemetry/TESTING.md index be36f91d32..874c7b40c3 100644 --- a/docker/telemetry/TESTING.md +++ b/docker/telemetry/TESTING.md @@ -1,6 +1,6 @@ # OpenTelemetry Integration Testing Guide -This document describes how to verify the rippled OpenTelemetry telemetry +This document describes how to verify the xrpld OpenTelemetry telemetry pipeline end-to-end, from span generation through the observability stack (otel-collector, Tempo, Prometheus, Grafana). @@ -118,25 +118,25 @@ Wait 5 seconds for the batch export, then: ```bash TEMPO="http://localhost:3200" -# Check rippled service is registered +# Check xrpld service is registered curl -s "$TEMPO/api/v2/search/tag/resource.service.name/values" | jq '.tagValues[].value' # Check RPC spans curl -s "$TEMPO/api/search" \ - --data-urlencode 'q={resource.service.name="rippled" && name="rpc.request"}' \ + --data-urlencode 'q={resource.service.name="xrpld" && name="rpc.request"}' \ --data-urlencode 'limit=5' | jq '.traces | length' curl -s "$TEMPO/api/search" \ - --data-urlencode 'q={resource.service.name="rippled" && name="rpc.process"}' \ + --data-urlencode 'q={resource.service.name="xrpld" && name="rpc.process"}' \ --data-urlencode 'limit=5' | jq '.traces | length' curl -s "$TEMPO/api/search" \ - --data-urlencode 'q={resource.service.name="rippled" && name="rpc.command.server_info"}' \ + --data-urlencode 'q={resource.service.name="xrpld" && name="rpc.command.server_info"}' \ --data-urlencode 'limit=5' | jq '.traces | length' # Check transaction spans curl -s "$TEMPO/api/search" \ - --data-urlencode 'q={resource.service.name="rippled" && name="tx.process"}' \ + --data-urlencode 'q={resource.service.name="xrpld" && name="tx.process"}' \ --data-urlencode 'limit=5' | jq '.traces | length' ``` @@ -412,7 +412,7 @@ for op in "rpc.request" "rpc.process" \ "consensus.accept" "consensus.accept.apply" \ "consensus.validation.send"; do count=$(curl -s "$TEMPO/api/search" \ - --data-urlencode "q={resource.service.name=\"rippled\" && name=\"$op\"}" \ + --data-urlencode "q={resource.service.name=\"xrpld\" && name=\"$op\"}" \ --data-urlencode "limit=5" \ | jq '.traces | length') printf "%-35s %s traces\n" "$op" "$count" diff --git a/docker/telemetry/xrpld-telemetry.cfg b/docker/telemetry/xrpld-telemetry.cfg index 2a96dd6ab5..008a5f566a 100644 --- a/docker/telemetry/xrpld-telemetry.cfg +++ b/docker/telemetry/xrpld-telemetry.cfg @@ -46,7 +46,7 @@ docker/telemetry/data/debug.log # --- OpenTelemetry tracing --- [telemetry] enabled=1 -service_instance_id=rippled-standalone +service_instance_id=xrpld-standalone endpoint=http://localhost:4318/v1/traces exporter=otlp_http sampling_ratio=1.0 diff --git a/docs/telemetry-runbook.md b/docs/telemetry-runbook.md index 8d798e3353..532c3a4d5a 100644 --- a/docs/telemetry-runbook.md +++ b/docs/telemetry-runbook.md @@ -1,8 +1,8 @@ -# rippled Telemetry Operator Runbook +# xrpld Telemetry Operator Runbook ## Overview -rippled supports OpenTelemetry distributed tracing to provide visibility into RPC requests, transaction processing, and consensus rounds. +xrpld supports OpenTelemetry distributed tracing to provide visibility into RPC requests, transaction processing, and consensus rounds. ## Quick Start @@ -19,7 +19,7 @@ This starts: - **Prometheus** on http://localhost:9090 - **Grafana** on http://localhost:3000 -### 2. Enable telemetry in rippled +### 2. Enable telemetry in xrpld Add to your `xrpld.cfg`: @@ -58,7 +58,7 @@ cmake --build --preset default ## Span Reference -All spans instrumented in rippled, grouped by subsystem: +All spans instrumented in xrpld, grouped by subsystem: ### RPC Spans (Phase 2) @@ -104,7 +104,7 @@ All spans instrumented in rippled, grouped by subsystem: ## Prometheus Metrics (Spanmetrics) -The OTel Collector's spanmetrics connector automatically derives RED (Rate, Errors, Duration) metrics from every span. No custom metrics code is needed in rippled. +The OTel Collector's spanmetrics connector automatically derives RED (Rate, Errors, Duration) metrics from every span. No custom metrics code is needed in xrpld. ### Generated Metric Names @@ -123,7 +123,7 @@ Every metric carries these standard labels: | -------------- | ------------------ | ---------------------------------------- | | `span_name` | Span name | `rpc.command.server_info` | | `status_code` | Span status | `STATUS_CODE_UNSET`, `STATUS_CODE_ERROR` | -| `service_name` | Resource attribute | `rippled` | +| `service_name` | Resource attribute | `xrpld` | | `span_kind` | Span kind | `SPAN_KIND_INTERNAL` | Additionally, span attributes configured as dimensions in the collector become metric labels (dots → underscores): @@ -147,7 +147,7 @@ Configured in `otel-collector-config.yaml`: Three dashboards are pre-provisioned in `docker/telemetry/grafana/dashboards/`: -### RPC Performance (`rippled-rpc-perf`) +### RPC Performance (`xrpld-rpc-perf`) | Panel | Type | PromQL | Labels Used | | --------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | @@ -156,7 +156,7 @@ Three dashboards are pre-provisioned in `docker/telemetry/grafana/dashboards/`: | RPC Error Rate | bargauge | Error spans / total spans × 100, grouped by `xrpl_rpc_command` | `xrpl_rpc_command`, `status_code` | | RPC Latency Heatmap | heatmap | `sum(increase(traces_span_metrics_duration_milliseconds_bucket{span_name=~"rpc.command.*"}[5m])) by (le)` | `le` (bucket boundaries) | -### Transaction Overview (`rippled-transactions`) +### Transaction Overview (`xrpld-transactions`) | Panel | Type | PromQL | Labels Used | | --------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | --------------- | @@ -165,7 +165,7 @@ Three dashboards are pre-provisioned in `docker/telemetry/grafana/dashboards/`: | Transaction Path Distribution | piechart | `sum by (xrpl_tx_local) (rate(traces_span_metrics_calls_total{span_name="tx.process"}[5m]))` | `xrpl_tx_local` | | Transaction Receive vs Suppressed | timeseries | `rate(traces_span_metrics_calls_total{span_name="tx.receive"}[5m])` | — | -### Consensus Health (`rippled-consensus`) +### Consensus Health (`xrpld-consensus`) | Panel | Type | PromQL | Labels Used | | ----------------------------- | ---------- | ---------------------------------------------------------------------------------- | ----------- | @@ -195,7 +195,7 @@ Three dashboards are pre-provisioned in `docker/telemetry/grafana/dashboards/`: ### No traces appearing in Jaeger -1. Check rippled logs for `Telemetry starting` message +1. Check xrpld logs for `Telemetry starting` message 2. Verify `enabled=1` in the `[telemetry]` config section 3. Test collector connectivity: `curl -v http://localhost:4318/v1/traces` 4. Check collector logs: `docker compose logs otel-collector`