mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-15 09:12:25 +00:00
Upgrade Loki from 2.9.0 to 3.4.2 which supports native OTLP ingestion. Replace removed `loki` exporter with `otlphttp/loki` pointed at Loki's /otlp endpoint. The `loki` exporter was dropped in otel-collector-contrib v0.147.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
119 lines
3.6 KiB
YAML
119 lines
3.6 KiB
YAML
# Docker Compose stack for rippled OpenTelemetry observability.
|
|
#
|
|
# Provides services for local development:
|
|
# - otel-collector: receives OTLP traces from rippled, batches and
|
|
# forwards them to Jaeger and Tempo. Also tails rippled log files
|
|
# via filelog receiver and exports to Loki. Listens on ports
|
|
# 4317 (gRPC), 4318 (HTTP), and 8125 (StatsD UDP).
|
|
# - jaeger: all-in-one tracing backend with UI on port 16686.
|
|
# - tempo: Grafana Tempo tracing backend, queryable via Grafana Explore
|
|
# on port 3000. Recommended for production (S3/GCS storage, TraceQL).
|
|
# - loki: Grafana Loki log aggregation backend for centralized log
|
|
# ingestion and log-trace correlation (Phase 8).
|
|
# - grafana: dashboards on port 3000, pre-configured with Jaeger, Tempo,
|
|
# Prometheus, and Loki datasources.
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker/telemetry/docker-compose.yml up -d
|
|
#
|
|
# Configure rippled to export traces by adding to xrpld.cfg:
|
|
# [telemetry]
|
|
# enabled=1
|
|
# endpoint=http://localhost:4318/v1/traces
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
otel-collector:
|
|
image: otel/opentelemetry-collector-contrib:latest
|
|
command: ["--config=/etc/otel-collector-config.yaml"]
|
|
ports:
|
|
- "4317:4317" # OTLP gRPC
|
|
- "4318:4318" # OTLP HTTP (traces + native OTel metrics)
|
|
- "8889:8889" # Prometheus metrics (spanmetrics + OTLP)
|
|
- "13133:13133" # Health check
|
|
# StatsD UDP port removed — beast::insight now uses native OTLP.
|
|
# Uncomment if using server=statsd fallback:
|
|
# - "8125:8125/udp"
|
|
volumes:
|
|
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
|
|
# Phase 8: Mount rippled log directory for filelog receiver.
|
|
# The integration test writes logs to /tmp/xrpld-integration/;
|
|
# mount it read-only so the collector can tail debug.log files.
|
|
- /tmp/xrpld-integration:/var/log/rippled:ro
|
|
depends_on:
|
|
- jaeger
|
|
- tempo
|
|
- loki
|
|
networks:
|
|
- rippled-telemetry
|
|
|
|
jaeger:
|
|
image: jaegertracing/all-in-one:latest
|
|
environment:
|
|
- COLLECTOR_OTLP_ENABLED=true
|
|
ports:
|
|
- "16686:16686" # Jaeger UI
|
|
- "14250:14250" # gRPC
|
|
networks:
|
|
- rippled-telemetry
|
|
|
|
tempo:
|
|
image: grafana/tempo:2.7.2
|
|
command: ["-config.file=/etc/tempo.yaml"]
|
|
ports:
|
|
- "3200:3200" # Tempo HTTP API (health, query)
|
|
volumes:
|
|
- ./tempo.yaml:/etc/tempo.yaml:ro
|
|
- tempo-data:/var/tempo
|
|
networks:
|
|
- rippled-telemetry
|
|
|
|
# Phase 8: Grafana Loki for centralized log ingestion and log-trace
|
|
# correlation. Loki 3.x supports native OTLP ingestion, so the OTel
|
|
# Collector exports via otlphttp to Loki's /otlp endpoint.
|
|
# Query logs via Grafana Explore -> Loki at http://localhost:3000.
|
|
loki:
|
|
image: grafana/loki:3.4.2
|
|
ports:
|
|
- "3100:3100"
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
networks:
|
|
- rippled-telemetry
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
depends_on:
|
|
- otel-collector
|
|
networks:
|
|
- rippled-telemetry
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
environment:
|
|
- GF_AUTH_ANONYMOUS_ENABLED=true
|
|
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
|
|
depends_on:
|
|
- jaeger
|
|
- tempo
|
|
- prometheus
|
|
- loki
|
|
networks:
|
|
- rippled-telemetry
|
|
|
|
volumes:
|
|
tempo-data:
|
|
|
|
networks:
|
|
rippled-telemetry:
|
|
driver: bridge
|