Skip to content

docs(observability): the resource attributes a metrics pipeline must promote to labels are stated (#1539) - #1554

Merged
bpalermo merged 5 commits into
mainfrom
docs/1539-metric-label-promotion
Oct 9, 2026
Merged

bpalermo merged 5 commits into
mainfrom
docs/1539-metric-label-promotion

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #1539

The alert rules in docs/observability/ select on node and job. The components do not set those labels. They set k8s.node.name and service.name on the OTLP resource, and the metrics pipeline makes the labels. Nothing under docs/ said so.

What is added

  • docs/observability/metric-labels.md
    • the resource attributes each component sets, read from the charts' OTEL_RESOURCE_ATTRIBUTES and each resource builder;
    • the labels each shipped rule file needs;
    • what a missing promotion looks like;
    • an example OpenTelemetry Collector transform processor and the Prometheus otlp.promote_resource_attributes setting, both marked as examples;
    • five queries to check a pipeline with.
  • docs/observability/README.md: a short section ahead of "Installing" that links to it.

What the page establishes

  • node has to be made from k8s.node.name, and it has to be called node. Promoting it as k8s_node_name keeps the series apart, but the rules do not select on that name.
  • job comes from service.name. The node proxy's Envoy stats set no service.name, so they have no job.
  • The registrar and the controller set no k8s.node.name, and only the edge proxy sets service.instance.id. Registrar replicas are told apart by k8s.pod.name alone, and the pipeline has to promote it for AetherRegistrarSnapshotDiverged to have more than one series to compare.

How the "what breaks" table was checked

Three rows were run with bazel run //bazel/promtool -- test rules against copies of the shipped rule files, with two nodes (or two replicas) and one of them failing:

Input Result
node label named k8s_node_name, one node unchained AetherCNIConflistUnchained: no alert
the same, one node with zero records MeshDNSNoRecords: one alert, no node label, summary ends "on "
registrar replicas collapsed to one series AetherRegistrarSnapshotDiverged: no alert
registrar replicas apart by pod, with and without job fires in both

The row about counters and gauges collapsing fleet-wide is taken from the chart's own comments (agent-proxy-configmap.yaml, edge-deployment.yaml), not measured here.

The Collector example was parsed as YAML and not run against a Collector: the page says so.

Not changed

agent-pin-alerts.yml and its test (#1528), and test/harnesscontract/ (#1535).

Tests

  • bazel test //:observability_rules_test //website:site_test: pass
  • make format-check: clean

No BUILD edit: //:website_docs globs docs/**/*.md, and the new page is not a rule file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…promote to labels are stated (#1539)

The shipped alert rules select on `node` and `job`. The components set
`k8s.node.name` and `service.name` on the OTLP resource and the pipeline
makes the labels. docs/observability/metric-labels.md says which attributes
each component sets, which labels each rule file needs, what a missing
promotion looks like (run through promtool against the shipped rules), and
gives an example Collector and Prometheus configuration. The README links
to it ahead of "Installing".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Copilot AI balanced review requested due to automatic review settings October 9, 2026 17:39
@bpalermo bpalermo added documentation Improvements or additions to documentation observability Metrics, logs, profiles, alerts labels Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Two statements inaccurately describe rule requirements and registrar query cardinality.

2 open findings
What changed in this PR

Documents the metric resource-attribute promotion required by Aether’s alerting rules and operational queries.

Changes:

  • Adds component attribute and required-label mappings.
  • Provides pipeline examples, failure symptoms, and validation queries.
  • Links the new guidance from the observability README.
File Description
docs/​observability/​README.md Introduces and links the label guidance.
docs/​observability/​metric-labels.md Documents attributes, promotions, examples, and checks.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/observability/README.md Resolved
Comment thread docs/observability/metric-labels.md Resolved
Copilot AI balanced review requested due to automatic review settings October 9, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new guide contains inaccurate hostname semantics and cardinality expectations.

0 open findings

2 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Low severity Avoid documenting pod hostname as the node hostname

docs/​observability/​metric-labels.md:69

hostNetwork does not make a pod share the node's hostname/UTS namespace; resource.WithHost() still observes the pod hostname (normally the pod name). The Envoy node proxy also only uses the environment resource detector, and its chart attributes contain no host.name. Please avoid documenting either as a node hostname, since that could encourage a pipeline to derive an unstable or absent node value.

Low severity Describe pin results as one row per expected job and node

docs/​observability/​metric-labels.md:168

The pin query groups by (job, node), not just node, and both the node agent and edge control plane emit this metric (the rule file explicitly documents both jobs). A node hosting edge can therefore legitimately produce multiple rows. Describe this as one row per expected (job, node) so the validation does not report a correctly labelled pipeline as broken.

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The example can collapse co-located edge control-plane replicas, and one failure-mode description incorrectly includes the prober.

2 open findings

🧠 Review effort: Balanced

Comment thread docs/observability/metric-labels.md Resolved
Comment thread docs/observability/metric-labels.md Resolved
Copilot AI balanced review requested due to automatic review settings October 9, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The guide incorrectly calls k8s.pod.name the sole replica discriminator despite also documenting host.name as the pod name.

2 open findings
Previously missed (1)

In code that hasn't changed since last review

Low severity Clarify k8s.pod.name as promoted Kubernetes identity, not sole differentiator

docs/​observability/​metric-labels.md:56

This contradicts the resource-builder behavior documented below: the registrar and controller also use resource.WithHost() (common/telemetry/setup/setup.go:65), and line 70 says their host.name is the pod name, so k8s.pod.name is not the only resource attribute that distinguishes replicas. Present it as the explicit Kubernetes identity to promote rather than the sole differentiator.

🧠 Review effort: Balanced

@bpalermo
bpalermo merged commit 4d3e6db into main Oct 9, 2026
31 checks passed
@bpalermo
bpalermo deleted the docs/1539-metric-label-promotion branch October 9, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation observability Metrics, logs, profiles, alerts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: which resource attributes a metrics pipeline must promote to labels is not stated

2 participants