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