From f81919af05171192e10097cdab1d5b4066cf3c62 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:56:15 +0100 Subject: [PATCH] docs(telemetry): document tier template variables and label checks - 09-data-collection-reference: add $service_name, $deployment_environment, $xrpl_network_type to the template-variable table; note they appear on all dashboards and point to the runbook's Deployment Tiers section. - TESTING.md: add a Prometheus check verifying the tier labels (deployment_environment, xrpl_network_type, service_name) are present on metric series. Co-Authored-By: Claude Opus 4.8 --- .../09-data-collection-reference.md | 18 +++++++++++++----- docker/telemetry/TESTING.md | 6 ++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/OpenTelemetryPlan/09-data-collection-reference.md b/OpenTelemetryPlan/09-data-collection-reference.md index 7d4555d7d0..92bdc46751 100644 --- a/OpenTelemetryPlan/09-data-collection-reference.md +++ b/OpenTelemetryPlan/09-data-collection-reference.md @@ -580,11 +580,19 @@ The Consensus Health dashboard includes 5 close-time panels added in Phase 4: **Template variables** (Consensus Health dashboard): -| Variable | Source Attribute | Description | -| ----------------------- | ------------------------------------- | ------------------------------------------------------------------------ | -| `$node` | `exported_instance` | Filter by xrpld node instance | -| `$close_time_correct` | `xrpl_consensus_close_time_correct` | Filter by close time correctness (`true` / `false`) | -| `$resolution_direction` | `xrpl_consensus_resolution_direction` | Filter by resolution direction (`increased` / `decreased` / `unchanged`) | +| Variable | Source Attribute | Description | +| ------------------------- | ------------------------------------- | ------------------------------------------------------------------------ | +| `$node` | `exported_instance` | Filter by xrpld node instance | +| `$service_name` | `service_name` | Filter by service (`service.name`, e.g. `xrpld`) | +| `$deployment_environment` | `deployment_environment` | Filter by deployment tier (`local` / `test` / `ci` / `prod`) | +| `$xrpl_network_type` | `xrpl_network_type` | Filter by network (`mainnet` / `testnet` / `devnet`) | +| `$close_time_correct` | `xrpl_consensus_close_time_correct` | Filter by close time correctness (`true` / `false`) | +| `$resolution_direction` | `xrpl_consensus_resolution_direction` | Filter by resolution direction (`increased` / `decreased` / `unchanged`) | + +The `$service_name`, `$deployment_environment`, and `$xrpl_network_type` +variables are present on all dashboards; each variable name matches its +Prometheus label. See [telemetry-runbook.md](../docs/telemetry-runbook.md) +"Deployment Tiers" for how the tier attributes are set and reach metrics. ### 3.4 Accessing the Dashboards diff --git a/docker/telemetry/TESTING.md b/docker/telemetry/TESTING.md index 6fe7bdc732..2a6cfac9f2 100644 --- a/docker/telemetry/TESTING.md +++ b/docker/telemetry/TESTING.md @@ -444,6 +444,12 @@ curl -s "$PROM/api/v1/query?query=traces_span_metrics_duration_milliseconds_coun # RPC calls by command curl -s "$PROM/api/v1/query?query=traces_span_metrics_calls_total{span_name=~\"rpc.command.*\"}" | jq '.data.result[] | {command: .metric["xrpl.rpc.command"], count: .value[1]}' + +# Deployment-tier labels present on metrics (set by the collector's +# resource/tier processor and promoted via resource_to_telemetry_conversion). +# Expect deployment_environment and xrpl_network_type on each series. +curl -s "$PROM/api/v1/query?query=traces_span_metrics_calls_total" | + jq '.data.result[0].metric | {deployment_environment, xrpl_network_type, service_name}' ``` ### Grafana