ci(telemetry): recognize perf-iac identity labels in otel-naming Rule D

xrpl_branch and xrpl_node_role are collector/infra-injected resource
labels used by perf-iac dashboards to identify the build under test and
its role in the perf cluster. They have no L1 span-attribute source or
L6 native-metric-label source (like the existing job/instance/job_type
builtins), so Rule D flagged them across every perf-iac dashboard.
Register them in the builtins set, matching the existing pattern for
infra-level dashboard labels. Add test coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-07-20 17:49:44 +01:00
parent daea7fa34f
commit 48747bab4c
2 changed files with 8 additions and 0 deletions

View File

@@ -822,6 +822,8 @@ def run_rule_d_dashboards(
"service_instance_id",
"job",
"instance",
"xrpl_branch", # perf-iac identity label: git ref of the build under test
"xrpl_node_role", # perf-iac identity label: validator/peer role in the perf cluster
}
# A dashboard label is valid if it is a span attribute (L1), a native-metric
# label (L6), or a Prometheus/Grafana builtin.

View File

@@ -744,6 +744,12 @@ class RuleDDashboards(unittest.TestCase):
[],
)
def test_perf_iac_identity_labels_not_flagged(self):
self.assertEqual(
self._run('"expr": "sum by (xrpl_branch, xrpl_node_role) (x)"', set()),
[],
)
def test_prometheus_name_label_not_flagged(self):
# `__name__` is the Prometheus reserved metric-name label; the renamed
# system-*.json dashboards use `sum by (le, __name__)`.