diff --git a/OpenTelemetryPlan/09-data-collection-reference.md b/OpenTelemetryPlan/09-data-collection-reference.md index 103193bedd..ab7520955c 100644 --- a/OpenTelemetryPlan/09-data-collection-reference.md +++ b/OpenTelemetryPlan/09-data-collection-reference.md @@ -621,15 +621,24 @@ For each of the 45+ overlay traffic categories (defined in `TrafficCount.h`), fo ### 3.3 Deployment-Tier Template Variables -Every dashboard carries four filtering template variables (each variable name -matches its Prometheus label), letting one Grafana stack be sliced by tier: +Every dashboard carries seven filtering template variables (each variable name +matches its Prometheus label), letting one Grafana stack be sliced by tier and +by perf-comparison run: -| Variable | Source label | Description | -| ------------------------- | ------------------------ | ------------------------------------------------------------ | -| `$node` | `service_instance_id` | 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`) | +| Variable | Source label | Description | +| ------------------------- | ------------------------ | ---------------------------------------------------------------- | +| `$node` | `service_instance_id` | 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` / `perf`) | +| `$xrpl_work_item` | `xrpl_work_item` | Filter by perf-iac work item / ticket (e.g. `RIPD-7455`) | +| `$xrpl_branch` | `xrpl_branch` | Filter by comparison side (`baseline::` / `test:…`) | +| `$xrpl_node_role` | `xrpl_node_role` | Filter by node role (`validator` / `peer`) | + +The last three are populated only during perf-iac comparison runs (stamped as +resource attributes by perf-iac's own alloy pipeline, not the repo collector). +Outside those runs the labels are absent; the filters default to **All**, which +matches series lacking the label so every dashboard still renders. See [telemetry-runbook.md](../docs/telemetry-runbook.md) "Deployment Tiers" for how the tier attributes are set and reach metrics. diff --git a/docs/telemetry-runbook.md b/docs/telemetry-runbook.md index cfb57407bb..cd0b10d08e 100644 --- a/docs/telemetry-runbook.md +++ b/docs/telemetry-runbook.md @@ -803,18 +803,29 @@ Multiple xrpld instances can send telemetry to per-tier collectors that all forward to one Grafana stack. Four resource attributes segregate the data so one dashboard set serves every deployment: -| Dimension | Attribute | Set by | Example values | -| ----------- | ------------------------ | ---------- | ------------------------------ | -| Node | `service.instance.id` | xrpld cfg | `alice-laptop`, `ci-runner-7` | -| Service | `service.name` | xrpld cfg | `xrpld`, `xrpld-validator` | -| Network | `xrpl.network.type` | xrpld node | `mainnet`, `testnet`, `devnet` | -| Environment | `deployment.environment` | collector | `local`, `test`, `ci`, `prod` | +| Dimension | Attribute | Set by | Example values | +| ----------- | ------------------------ | ---------- | ------------------------------------------------ | +| Node | `service.instance.id` | xrpld cfg | `alice-laptop`, `ci-runner-7` | +| Service | `service.name` | xrpld cfg | `xrpld`, `xrpld-validator` | +| Network | `xrpl.network.type` | xrpld node | `mainnet`, `testnet`, `devnet`, `perf` | +| Environment | `deployment.environment` | collector | `local`, `test`, `ci`, `prod` | +| Work Item | `xrpl.work.item` | perf-iac | `RIPD-7455` (empty outside perf runs) | +| Branch | `xrpl.branch` | perf-iac | `baseline::`, `test::` | +| Node Role | `xrpl.node.role` | perf-iac | `validator`, `peer` | Dashboards expose these as the template variables `$node`, `$service_name`, -`$xrpl_network_type`, and `$deployment_environment` (each variable name -matches its Prometheus label). Select them top-down — environment → network -→ service → node. Selecting **All** matches every value, including series -lacking the label, so mixed old/new data never disappears. +`$xrpl_network_type`, `$deployment_environment`, `$xrpl_work_item`, +`$xrpl_branch`, and `$xrpl_node_role` (each variable name matches its +Prometheus label). Select them top-down — work item → branch → node role → +node for a perf comparison run, or environment → network → service → node for +general use. Selecting **All** matches every value, including series lacking +the label, so mixed old/new data never disappears. + +The last three (`$xrpl_work_item`, `$xrpl_branch`, `$xrpl_node_role`) are +populated only during perf-iac comparison runs, which stamp them as resource +attributes from their own alloy pipeline. Outside those runs the labels are +absent; leaving the filters on **All** keeps every dashboard rendering +normally. ### Who owns which attribute