Repository navigation
fix(telemetry): per-node identity for static infra cluster stats (agent_xds) - #210
Merged
Merged
Conversation
The OTLP stat sink emits an empty OTLP Resource (it builds the resource solely from configured resource_detectors, of which there were none), so every proxy's stats collapse onto one identityless series per aether.cluster. That collapse is intended for per-service mesh clusters (bounds cardinality at the node-count target), but it breaks the static infra clusters (agent_xds, otel_collector): exactly one such cluster exists per node, so N proxies multiplex N cumulative counters onto a single series. rate()/ increase() over that colliding series fabricate phantom upstream_rq_tx_reset and upstream_cx_connect_fail — a flat, constant ~2.8/s fleet rate with no real failure behind it (ADS stream is healthy; absolute counters are tiny). Add the environment resource detector to the stats sink and stamp OTel k8s.* semantic-convention attributes (k8s.node.name/namespace/pod/uid) into the Resource via OTEL_RESOURCE_ATTRIBUTES from the downward API. The collector promotes k8s.node.name -> a `node` label ONLY for the two static infra clusters (selective transform/promote), so their per-node series stop colliding while mesh clusters stay collapsed. k8s.node.name (not pod.name) is promoted so the counter series survives proxy hot-restarts cleanly. Config-only: the environment resource detector is already compiled into the custom proxy; no rebuild. Bumps the agent chart 0.2.2 -> 0.2.3. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Grafana panels
rate(envoy_cluster_upstream_rq_tx_reset_total{aether_cluster="agent_xds"})andrate(envoy_cluster_upstream_cx_connect_fail_total{aether_cluster="agent_xds"})show a flat, constant ~2.8/s fleet rate — alarming, but not a real failure.
agent_xdsis the static bootstrap cluster every Envoy uses to reach itsco-located agent xDS over the UDS pipe. Investigation on talos-main:
cx_active=1,rq_active=1, clean proxy logs, config flowing). The data plane (mesh clusters) has zero connect failures.agent_xdsmetric is a single fleet-wide series carrying only theaether_clusterlabel — no pod/node identity.The OTLP stat sink builds its Resource solely from configured
resource_detectors(open_telemetry_impl.cc), and there were none, so the Resource is empty. All 5 proxies therefore push their cumulative counters onto the same identityless series.rate()/increase()over that colliding series interpret the interleaved per-proxy values as a continuous stream of increments + resets → a phantom constant rate. The collapse is correct for per-service mesh clusters (bounds cardinality at the node target) but wrong for the static infra clusters, of which exactly one exists per node.Fix
environmentresource detector to the OTLP stat sink (already compiled into the custom proxy — config-only, no rebuild).k8s.*semantic-convention attributes (k8s.node.name,k8s.namespace.name,k8s.pod.name,k8s.pod.uid) into the Resource viaOTEL_RESOURCE_ATTRIBUTESfrom the downward API.0.2.2 → 0.2.3.Companion change (already applied in-cluster)
The otel-collector already promoted
host.name → nodeglobally. That has been changed (helmotel-collector, o11y, rev 14) to source fromk8s.node.nameand promote only foragent_xds/otel_collector:This keeps mesh stats collapsed (no per-node cardinality split at the 10k-node target) while giving the infra clusters per-node identity.
k8s.node.name(notk8s.pod.name) is promoted so the per-node counter series survives proxy hot-restarts cleanly. The collector change was applied first, so there is no window where mesh stats split when this chart deploys.Validation
envoy.yamlparses with the detector in place.🤖 Generated with Claude Code