Skip to content

feat(telemetry): set the metric series budget from a measured noop run #8023

Backlog

Description

@devops-cli-service

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_ATTRIBUTES holds the unit's stable service.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 k8s passes.

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.id stable 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 row and repo identify its series.
  • Where does a pod template get the instance id?: From the OTEL_RESOURCE_ATTRIBUTES environment 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

  1. added
    type/feature
    scope/telemetry
    source/agent
    status/new
    on Dec 1, 2026
  2. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    value/medium
    effort/medium
    priority/p2-medium
    on Dec 1, 2026
  4. changed the title [-]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[/+] on Dec 1, 2026
  5. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor

    The job shortened the title of this item. The summary had 70 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(telemetry): set the metric series budget of a devops unit from a measured noop run
    • Source of the summary: the background model
  6. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/telemetrysource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions