Repository navigation
Description
Split from #6595.
Problem Each pod of a devops-cli unit writes its own instance label on the OTLP export. The series of one unit multiply per pod. No metric series budget exists, and no measurement exists for 100 devops-cli-noop Workflows in 1 hour. The budget has no value without that measurement. ## Why this part is deferred The measurement needs a live cluster run of 100 Workflows for 1 hour. No offline test can show it, and the budget value comes from it. The Argo Workflows alerts of #6595 do not need it. ## Acceptance criteria - A comment on this issue gives the measured API-server requests and the new metric series for 100 devops-cli-noop Workflows in 1 hour. - Each devops-cli Workflow pod template sets OTEL_RESOURCE_ATTRIBUTES with a stable service.instance.id for its unit, so one stream carries every pod of the unit and row and repo identify its series. - A live check after the release shows that the series of one unit stay in the budget. ## Source Split from #6595.
Proposed design
Problem statement
Set a stable service.instance.id for each devops-cli unit, so one stream carries every pod of the unit. Each pod now writes its own instance label on the OTLP export, so the metric series of one unit multiply per pod. row and repo then identify its series. The budget measurement needs a live cluster run, so a separate issue delivers it.
Acceptance criteria
Requirement: Stable instance id in the tracer
The telemetry tracer SHALL set service.instance.id from a stable per-unit value, so every pod of a unit exports one stream.
Scenario: Two pods of one unit share the instance id
- WHEN The tracer builds the OTLP resource for two pods of one unit.
- THEN The test asserts that both resources carry the same
service.instance.id.
Requirement: Stable instance id in the cluster job
The cluster job builder SHALL set OTEL_RESOURCE_ATTRIBUTES with the stable service.instance.id on each Job it creates.
Scenario: A Job carries the stable instance id
- WHEN The builder creates a Job for a unit.
- THEN The test asserts that
OTEL_RESOURCE_ATTRIBUTESholds the unit's stableservice.instance.id.
Requirement: Stable instance id in each pod template
Each devops-cli pod template SHALL set OTEL_RESOURCE_ATTRIBUTES with the stable service.instance.id of its unit.
Scenario: The k8s validator accepts the pod templates
- WHEN The k8s validator runs over the manifests of
k8s/devops/. - THEN
uv run devops ci --check --only k8spasses.
Existing Tool Considered
No alternatives check has run. The OpenTelemetry SDK, which src/devops_cli/telemetry/tracer.py already uses, covers the OTLP resource attributes and the service.instance.id field. It does not choose the value, so the project supplies a stable per-unit id and sets it on each pod template.
Key questions
- Which value makes
service.instance.idstable for a unit?: The unit's name, so every pod of the unit exports one stream. A random per-pod id multiplies the series. (best practice) [sources: docs/TELEMETRY.md:41, src/devops_cli/telemetry/tracer.py, CHANGELOG.md:1238, src/devops_cli/k8s/cluster_job.py]- Rejected: Per-pod random id. It multiplies the series of one unit by the number of its pods.
- Rejected: Per-job unique id. It still gives one stream per pod, not one stream per unit (feat(roadmap): give each stage Job its own metric instance id #6364).
- Chosen: Per-unit stable id. One stream carries every pod of the unit, and
rowandrepoidentify its series.
- Where does a pod template get the instance id?: From the
OTEL_RESOURCE_ATTRIBUTESenvironment variable in the pod template. [sources: k8s/devops/cronjob-runner.yaml:85, k8s/devops/cronjob-runner.yaml:165, docs/TELEMETRY.md:41]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Dec 1, 2026
Both are deferred live-check steps for telemetry metric streams, but #4984 verifies the #4697 fix over 24 hours while the candidate measures 100 noop Workflows in 1 hour to set a budget.[-]feat(telemetry): set the metric series budget of a devops unit from a measured noop run[/-][+]feat(telemetry): set the metric series budget from a measured noop run[/+]devops-cli-service commentedon Dec 1, 2026
The job shortened the title of this item. The summary had 70 characters, and the limit is 60. The type and the scope stay.
feat(telemetry): set the metric series budget of a devops unit from a measured noop rundevops-cli-service commentedon Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.