# Grafana datasource provisioning for Grafana Tempo. # Auto-configures Tempo as a trace data source on Grafana startup. # Access Grafana at http://localhost:3000, then use Explore -> Tempo # to browse xrpld traces using TraceQL. # # Search filters provide pre-configured dropdowns in the Explore UI. # Each phase adds filters for the span attributes it introduces. # Phase 1b (infra): Base filters — node identity, service, span name, status. # Phase 2 (RPC): RPC command, status, role filters. # Phase 3 (TX): Transaction hash, local/peer origin, status. # Phase 4 (Cons): Consensus mode, round, ledger sequence, close time. apiVersion: 1 datasources: - name: Tempo type: tempo access: proxy url: http://tempo:3200 uid: tempo jsonData: nodeGraph: enabled: true # Service map and traces-to-metrics require a Prometheus datasource # (not included in this stack). These features are inactive until a # Prometheus service is added to docker-compose.yml. serviceMap: datasourceUid: prometheus # Phase 8: Trace-to-log correlation — enables one-click navigation # from a Tempo trace to the corresponding Loki log lines. Filters # by trace_id so only logs from the same trace are shown. tracesToLogs: datasourceUid: loki filterByTraceID: true filterBySpanID: false tags: ["partition", "severity"] tracesToMetrics: datasourceUid: prometheus spanStartTimeShift: "-1h" spanEndTimeShift: "1h" search: filters: # --- Node identification filters --- # service.name: logical service name (default: "xrpld"). # Useful when running multiple service types in the same collector. - id: service-name tag: service.name operator: "=" scope: resource type: static # service.instance.id: unique node identifier — configurable via # the service_instance_id setting in [telemetry], defaults to the # node's public key. E.g. "Node-1" or "nHB1X37...". - id: node-id tag: service.instance.id operator: "=" scope: resource type: static # service.version: xrpld build version (e.g., "2.4.0-b1"). # Filter traces from specific software releases. - id: node-version tag: service.version operator: "=" scope: resource type: dynamic # xrpl.network.id: numeric network identifier # (0 = mainnet, 1 = testnet, 2 = devnet, etc.). # Derived from the [network_id] config section. - id: network-id tag: xrpl.network.id operator: "=" scope: resource type: dynamic # xrpl.network.type: human-readable network name derived from # network ID ("mainnet", "testnet", "devnet", "unknown"). - id: network-type tag: xrpl.network.type operator: "=" scope: resource type: static # --- Span intrinsic filters --- # name: the span operation name (e.g., "rpc.command.server_info"). # Use to find traces for a specific RPC command or subsystem. - id: span-name tag: name operator: "=" scope: intrinsic type: static # status: span completion status ("ok", "error", "unset"). # Filter for failed operations to diagnose errors. - id: span-status tag: status operator: "=" scope: intrinsic type: static # duration: span wall-clock duration. Use with ">" operator # to find slow operations (e.g., duration > 500ms). - id: span-duration tag: duration operator: ">" scope: intrinsic type: static # Phase 2: RPC tracing filters - id: rpc-command tag: xrpl.rpc.command operator: "=" scope: span type: static - id: rpc-status tag: xrpl.rpc.status operator: "=" scope: span type: dynamic - id: rpc-role tag: xrpl.rpc.role operator: "=" scope: span type: dynamic # Phase 2: Node health filters (Task 2.8) - id: node-amendment-blocked tag: xrpl.node.amendment_blocked operator: "=" scope: span type: static - id: node-server-state tag: xrpl.node.server_state operator: "=" scope: span type: dynamic # Phase 3: Transaction tracing filters - id: tx-hash tag: xrpl.tx.hash operator: "=" scope: span type: static - id: tx-origin tag: xrpl.tx.local operator: "=" scope: span type: dynamic - id: tx-status tag: xrpl.tx.status operator: "=" scope: span type: dynamic # Phase 4: Consensus tracing filters - id: consensus-mode tag: xrpl.consensus.mode operator: "=" scope: span type: static - id: consensus-round tag: xrpl.consensus.round operator: "=" scope: span type: dynamic - id: consensus-ledger-seq tag: xrpl.consensus.ledger.seq operator: "=" scope: span type: static - id: consensus-close-time-correct tag: xrpl.consensus.close_time_correct operator: "=" scope: span type: dynamic - id: consensus-state tag: xrpl.consensus.state operator: "=" scope: span type: dynamic - id: consensus-close-resolution tag: xrpl.consensus.close_resolution_ms operator: "=" scope: span type: dynamic - id: consensus-proposers tag: xrpl.consensus.proposers operator: "=" scope: span type: dynamic - id: consensus-result tag: xrpl.consensus.result operator: "=" scope: span type: dynamic - id: consensus-mode-old tag: xrpl.consensus.mode.old operator: "=" scope: span type: dynamic - id: consensus-mode-new tag: xrpl.consensus.mode.new operator: "=" scope: span type: dynamic - id: consensus-ledger-id tag: xrpl.consensus.ledger_id operator: "=" scope: span type: static # Phase 3/4: Additional transaction and queue filters - id: tx-path tag: xrpl.tx.path operator: "=" scope: span type: dynamic - id: tx-suppressed tag: xrpl.tx.suppressed operator: "=" scope: span type: dynamic - id: peer-version tag: xrpl.peer.version operator: "=" scope: span type: dynamic - id: txq-status tag: xrpl.txq.status operator: "=" scope: span type: dynamic - id: txq-ter-code tag: xrpl.txq.ter_code operator: "=" scope: span type: dynamic