Skip to content

test(telemetry): record the metrics row cost over two live rollouts #3996

Open

Description

@devops-cli-service

Split from #3794.

The metrics row must stay near its level before #3601 over a period with two rollouts. A pull request cannot deliver this part. The Prometheus series holds production traffic only, and the check needs two deployments of the fix after merge. This part is deferred until those deployments exist. Acceptance criteria: run two rollouts with the new code; record sum by (row)(increase(devops_cli_github_requests_total[1h])) with row metrics after each rollout; show that the row stays near its pre-#3601 level of about 222 to 305 requests an hour; and state the result in a comment on the fix issue.

Proposed design

Problem statement

The metrics row of devops_cli_github_requests_total grew after #3601. The fix is in #3794. The Prometheus series holds production traffic only. No pull request and no offline test can show the fix. This item records the metrics row after two live rollouts of the merged fix. It states the result on #3794.

Acceptance criteria

Requirement: Two live rollouts recorded

The result MUST record two separate production rollouts of the merged fix from #3794, each with its deployment time and its measured metrics value.

Scenario: Both rollouts recorded

Requirement: Metrics row value from the documented query

The result SHALL give, for each rollout, the value of sum by (row) (increase(devops_cli_github_requests_total{row="metrics"}[1h])).

Scenario: Live query shows the metrics row

  • WHEN A person runs the live check sum by (row) (increase(devops_cli_github_requests_total{row="metrics"}[1h])) in Grafana Explore one hour after a rollout, with no status filter.
  • THEN The live check shows a row labeled metrics with a requests-per-hour value, and the comment on test(telemetry): verify the metrics row cost over two rollouts #3794 quotes the query text and that value.

Requirement: Verdict against the pre-#3601 band

The result MUST state for each rollout whether its metrics value is inside the band of 222 to 305 requests an hour.

Scenario: Value compared with the band

Requirement: Pending a person after the merge

A person SHALL state the result in one comment on the fix issue #3794 that links to this item.

Scenario: Comment posted

Existing Tool Considered

No alternatives check has run. Prometheus with PromQL and Grafana Explore cover the need: the Service already sends devops_cli_github_requests_total, and docs/CLUSTER.md:53 gives the query sum by (row) (increase(devops_cli_github_requests_total{row="metrics"}[1h])) and the pre-#3601 band in Grafana Explore. The tool lacks an offline source, because the series holds production traffic only and its value exists only after two live rollouts. This proposal builds no code, so the cost is two Grafana Explore reads and one comment on #3794, not tokens to write, keep and fix code; the elapsed time is set by the two rollouts and their one-hour windows.

Key questions

  • Which component produces the metrics row that this item measures?: The metrics row of the due table of the roadmap Service. That row reads the project metrics and calls no model. Its GitHub requests count in devops_cli_github_requests_total under the label row with the value metrics. [sources: docs/CLUSTER.md:53, docs/CLUSTER.md:58, src/devops_cli/github/request_scope.py, .ast-grep/rules/github-request-scope-row.yml]
  • What value counts as near the pre-feat(telemetry): measure how long roadmap items wait in each state #3601 level?: Use the band of 222 to 305 requests an hour that docs/CLUSTER.md:53 records for the query sum by (row) (increase(devops_cli_github_requests_total{row="metrics"}[1h])) with no status filter. The [1h] window gives a requests-per-hour value, so the comparison is direct. A value inside the band passes. A value outside the band fails, and the comment names the value. (best practice) [sources: docs/CLUSTER.md:53, docs/CLUSTER.md:52]
    • Chosen: Use the documented band of 222 to 305 requests an hour. docs/CLUSTER.md:53 records this band for this query, so the comparison is like with like and no new tolerance is invented.
    • Rejected: Add status!="304" and compare that result with the band. docs/CLUSTER.md:53 says that only the query with no status filter compares with the band.
    • Rejected: Use the hourly budget of 500 requests. docs/CLUSTER.md:52 sets that budget for all repositories together. It is a cap for the whole Service, not the pre-change level of this row, so a regression of this row could pass under it.
  • How is the result recorded?: In one comment on the fix issue test(telemetry): verify the metrics row cost over two rollouts #3794 after both rollouts. The comment holds each deployment time, the query, the metrics value, the verdict against the band and a link to test(telemetry): record the metrics row cost over two live rollouts #3996. It changes no code, test, alert or file, and a person runs the query in Grafana Explore as docs/CLUSTER.md:53 documents. (best practice) [sources: docs/CLUSTER.md:53]
    • Chosen: One comment on the fix issue test(telemetry): verify the metrics row cost over two rollouts #3794. The item asks for a comment on the fix issue, and docs/CLUSTER.md:53 says to run this check by hand after a merge. A one-time production check has no place in the code or in CI.
    • Rejected: Add a Prometheus alert or recording rule. An alert watches continuously and adds a rule, its tests and a threshold to keep. The item asks for a one-time record, not a monitor.
    • Rejected: Add an offline test or fixture. The series holds production traffic only, so no offline test can read it, and the item has no code to test.
    • Rejected: Write the result into a docs page or an ADR. The measurement is one-time, and the item asks for the result on the fix issue. A docs change would also need a pull request that this item does not have.

Fit

Fits in one pull request.

Suspected block

Two production rollouts of the merged fix from #3794, each followed by a one-hour window before the Grafana Explore read.

Dependencies

#3794

Activity

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

    @devops-cli-service
    ContributorAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/test. The test prefix of the title gives the type.
    • Scope: scope/telemetry. The (telemetry) scope of the title gives the scope.
    • Priority: P3-Low. The check waits on two deployments and it only confirms a merged fix.
    • Value: Medium. The check shows that the metrics row stays inside the GitHub budget.
    • Effort: Low. The work is two rollouts and one recorded query.
    • Possible duplicate: test(telemetry): verify the metrics row cost over two rollouts #3794, which may ask for the same change. The model names a live check that records the metrics row request rate over two rollouts as the change that both ask for. Both items need two live rollouts, the same Prometheus query and a comment on the fix issue. A person closes one of the two if that is so.
  3. added
    priority/p3-low
    on Nov 7, 2026
  4. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    ContributorAuthor

    The proposal at 1b37dbc needs splitting into 2 items. A person splits the item into the items below, or replies in a comment or edits the body to keep one item, and the next refine round looks at the item again.

    1. First rollout: deploy the merged fix and record the metrics row value after one hour.
    2. Second rollout: deploy the next rollout of the merged fix and record the metrics row value after one hour.
  5. dan-petty commented on Nov 14, 2026

    @dan-petty
    Owner

    The item cannot be delivered by a code change: it needs two live production rollouts of the merged #3794 fix and one Prometheus reading after each one-hour window, then one comment on #3794.

    No code or test is written. A person deploys the fix twice, reads the query after each hour, and posts the two values, the two verdicts and the link to this item on #3794. The item fits that remaining step, so keep it out of the implement queue.

  6. devops-cli-service commented on Nov 19, 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

  7. devops-cli-service commented on Nov 19, 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

  8. devops-cli-service commented on Nov 23, 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/p3-lowscope/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