Skip to content

test(telemetry): verify one metric stream per workload after rollout #4984

Open

Description

@devops-cli-service

Split from #4697.

Problem: The issue asks for a live 24-hour check after the rollout. The check reads Prometheus data from the cluster. Why deferred: It waits on 24 hours of live telemetry after the rollout, so it cannot pass in the pull request that makes the change. Acceptance criteria: 24 hours after the rollout, max(resets(devops_cli_github_requests_total{job='roadmap-service'}[24h])) is not more than the collector starts in that window. The issue records 16 resets, 15 Service pod starts and 2 collector starts. count(count by (instance) (devops_cli_command_total{job='devops-cli-job'})) is 1. Record both results on the issue.

Proposed design

Problem statement

The #4697 rollout needs a live telemetry check 24 hours after it deploys. The check cannot run before that window ends. Two PromQL queries read the cluster Prometheus. One query counts the GitHub request counter resets. One query counts the command metric streams. A person records both results on issue #4984. The check adds no code.

Acceptance criteria

Requirement: Reset count within collector starts

The 24-hour live check SHALL show that max(resets(devops_cli_github_requests_total{job='roadmap-service'}[24h])) is not more than the collector starts in that window.

Scenario: Reset count after the rollout

  • WHEN A person runs max(resets(devops_cli_github_requests_total{job='roadmap-service'}[24h])) in Grafana Explore 24 hours after the fix(telemetry): keep one metric stream per workload #4697 rollout.
  • THEN The query returns a value that is not more than the collector starts in that window, which the issue records as 2.

Requirement: Single command metric stream

The 24-hour live check SHALL show count(count by (instance) (devops_cli_command_total{job='devops-cli-job'})) as 1.

Scenario: Command stream count after the rollout

  • WHEN A person runs count(count by (instance) (devops_cli_command_total{job='devops-cli-job'})) in Grafana Explore after the same 24 hours.
  • THEN The query returns 1.

Requirement: Pending a person after the merge

The person SHALL record both query results in a comment on issue #4984.

Scenario: Results recorded on the issue

Existing Tool Considered

No alternatives check has run. Prometheus with PromQL is the open, maintained tool that covers the need. It counts counter resets with resets() and command streams with count by (instance). It lacks a scheduler and a record. A person runs the two queries in Grafana Explore 24 hours after the #4697 rollout and comments both results on issue #4984. The check adds no code, so it builds no tool.

Key questions

  • What does the maximum reset count compare against?: Compare it with the collector starts only. The collector holds the cumulative total for each stream. A Service pod start with the same stream identity continues that total. The 16 resets with 2 collector starts is the pre-fix failure that fix(telemetry): keep one metric stream per workload #4697 fixes. (best practice) [sources: docs/TELEMETRY.md, openspec/changes/archive/2026-11-13-4697-keep-one-metric-stream-per-workload/tasks.md, openspec/changes/archive/2026-11-13-4697-keep-one-metric-stream-per-workload/proposal.md]
    • Chosen: Collector starts only. The collector holds the cumulative total for each stream. A Service pod start with the same stream identity continues that total. The 16 resets with 2 collector starts is the failure that fix(telemetry): keep one metric stream per workload #4697 fixes.
    • Rejected: Sum of Service pod starts and collector starts. A Service pod start adds no reset after fix(telemetry): keep one metric stream per workload #4697, because the metric stream identity is stable. This comparison would hide the defect.
    • Rejected: Service pod starts only. A Service pod start adds no reset, and this option ignores the collector restart that does add one.
  • Which queries prove the two results, and where does a person run them?: The queries are max(resets(devops_cli_github_requests_total{job='roadmap-service'}[24h])) and count(count by (instance) (devops_cli_command_total{job='devops-cli-job'})). A person runs them in Grafana Explore against the cluster Prometheus, which holds both series. No offline test reaches those series. [sources: docs/TELEMETRY.md, openspec/changes/archive/2026-11-13-4697-keep-one-metric-stream-per-workload/tasks.md]
  • Does the check need a code change or a pull request?: No. The two series already exist in the code. The result of the check is a comment on issue test(telemetry): verify one metric stream per workload after rollout #4984. The check adds no instrument and no test. [sources: openspec/changes/archive/2026-11-13-4697-keep-one-metric-stream-per-workload/tasks.md, src/devops_cli/telemetry/instruments.py]
  • When does the 24-hour window start?: It starts at the rollout of fix(telemetry): keep one metric stream per workload #4697, when the new image serves and roadmap-service rolls once. A person reads the two queries 24 hours after that time. [sources: openspec/changes/archive/2026-11-13-4697-keep-one-metric-stream-per-workload/tasks.md, openspec/changes/archive/2026-11-13-4697-keep-one-metric-stream-per-workload/proposal.md]

Fit

Fits in one pull request.

Suspected block

24 hours of live telemetry after the #4697 rollout.

Dependencies

#4697

Activity

  1. added
    source/agent
    type/test
    scope/telemetry
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: 24 hours of live telemetry after the #4697 rollout.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  4. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  5. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

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/lowpriority/p2-mediumscope/telemetrysource/agentstatus/newtype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions