From b4af979a423f181b4a183a2a1bf6c2175b807ae5 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Tue, 14 Jul 2026 19:14:37 +0100 Subject: [PATCH] docs(telemetry): refresh legend-group comment for bracketed label values Update the config.alloy metric_statements comment to describe the current bracket-baked, ", "-joined group-label values ("[node, mainnet]"), matching the implementation. Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) --- docker/telemetry/alloy/config.alloy | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docker/telemetry/alloy/config.alloy b/docker/telemetry/alloy/config.alloy index 994f84fa62..feb5dd33fe 100644 --- a/docker/telemetry/alloy/config.alloy +++ b/docker/telemetry/alloy/config.alloy @@ -175,12 +175,15 @@ otelcol.processor.transform "tier" { // Grouped legend labels for the Grafana dashboards (kept in sync with the // reference collector's transform/legendgroups). The Cloud gateway // promotes these resource attributes to Prometheus labels server-side. - // * resource_group: node id, optionally suffixed with network type. - // * iac_group: perf-iac branch/role/work-item. A generic node like this - // one does not set those attrs, so the guard leaves iac_group unset; - // it is built only on perf-comparison nodes. The guard checks != "" - // as well as != nil because OTTL Concat emits a stray separator for an - // empty element. + // Brackets and ", " separators are baked into the VALUE (e.g. + // "[node, mainnet]") so the dashboard Display name needs no literal + // brackets and an absent group renders as nothing. + // * resource_group: "[node]" or "[node, network]". + // * iac_group: "[branch, role, work-item]". A generic node like this one + // does not set those attrs, so the guard leaves iac_group unset; it is + // built only on perf-comparison nodes. The guard checks != "" as well + // as != nil because OTTL Concat emits ""/a stray separator for an + // absent or empty element. `set(attributes["resource_group"], Concat(["[", attributes["service.instance.id"], "]"], "")) where attributes["service.instance.id"] != nil and attributes["service.instance.id"] != ""`, `set(attributes["resource_group"], Concat(["[", attributes["service.instance.id"], ", ", attributes["xrpl.network.type"], "]"], "")) where attributes["service.instance.id"] != nil and attributes["service.instance.id"] != "" and attributes["xrpl.network.type"] != nil and attributes["xrpl.network.type"] != ""`, `set(attributes["iac_group"], Concat(["[", Concat([attributes["xrpl.branch"], attributes["xrpl.node.role"], attributes["xrpl.work.item"]], ", "), "]"], "")) where attributes["xrpl.branch"] != nil and attributes["xrpl.branch"] != "" and attributes["xrpl.node.role"] != nil and attributes["xrpl.node.role"] != "" and attributes["xrpl.work.item"] != nil and attributes["xrpl.work.item"] != ""`,