Repository navigation
feat(telemetry): measure how long roadmap items wait in each state - #3601
Merged
Merged
Conversation
Record the decisions on the open questions of the plan: the alert window, the plan flag, items with no labeled event, the status cache limit and the stopped pod limit. Correct the line references. Re-check the premise on origin/main.
Declare three gauges. The item age and the item number take the labels repo, state and plan. The claim age takes repo. Tick tasks 1.1 and 1.2 and move each verification into a nested line.
Add label_changes to the roadmap store. The GitHub store reads the issue's own events listing. The in-memory store returns the changes its writes recorded. Tick tasks 2.1 and 2.2.
Compute the age of the oldest open item in each state and plan pair, its number, and the age of the oldest claim, from the labeled events of each item. A failed read sends no age and keeps the other metrics. Tick tasks 3.1 and 3.2.
The metrics row asks for the age of the oldest item in each state. A run from a workstation does not ask for it. Tick tasks 4.1 and 4.2.
Add the rule group roadmap-service-items with RoadmapServiceItemStuck. It fires for a blocked item, or a ready item with a plan, older than 24 hours, and names the item. The promtool unit tests cover the five cases of the spec. Tick tasks 5.1 and 5.2.
Add the panel Oldest Item Age by State beside the items panels, and move the rows below it down by 8. A test checks the queries, the unit, the grid position and that no panel overlaps another. Tick tasks 6.1 and 6.2.
Regenerate docs/TELEMETRY.md from the instrument descriptions. Tick task 7.1.
Archive the change folder and merge its spec deltas into the project metrics dashboard and roadmap service alerts specs.
This reverts commit 87a96a6befa050ad3ae30bbbf0e445fc8eec1974.
The summary of RoadmapServiceItemStuck printed "Item # of <repo>" when the number series was missing. The sign now sits inside the conditional block, so the summary reads "Item of <repo>" in that case (#2919).
A round of one repository cleared the cached label times of every other repository. The cache now drops only the entries of the repository that the round reads (#2919). The label slug rule now lives once, in label_slug of roadmap/store.py. The metrics module uses it for the state label.
The descriptions of the item age and the oldest item number gauges had sentences over the ASD-STE100 limit. The text is shorter and the meaning is the same. docs/TELEMETRY.md is generated from the new text (#2919).
The description of RoadmapServiceItemStuck is shorter. It keeps the runbook pointer and the command that a person runs (#2919).
The age metrics read the label events of an open item. The rejected option named that read as a cost, so the note records the change-only reads that keep the steady cost low (#2919).
The runbook named three promtool fixtures and missed the fixture of the item age group. It now names all four, and its sentences are shorter (#2919).
The proposal, design, tasks and spec deltas had sentences over the ASD-STE100 limits. The text is split into shorter sentences, and the requirements, scenarios and task checks keep their meaning. The design now states that the ADR has a note for the item age reads (#2919).
Archives the change of issue #2919 and merges its spec deltas into openspec/specs.
This reverts commit d4d4d81.
Owner
Author
Publish notes for issue #2919Result. All 23 GitHub checks pass on commit b1ee73b. This pull request stays a draft. The stage recommendation is draft, and a person has not reviewed the diff yet. Local checks
Fail-to-pass. The replay Deviations.
Open items.
|
dan-petty
marked this pull request as ready for review
November 5, 2026 09:49
dan-petty
pushed a commit
that referenced
this pull request
Nov 5, 2026
🤖 I have created a release *beep* *boop* --- ## [0.61.0](v0.60.0...v0.61.0) (2026-11-05) ### Features * **roadmap:** check each behavior group fails on base before the change ([#3602](#3602)) ([7b8a4a1](7b8a4a1)) * **roadmap:** the inbox lists every person wait of each service repo ([#3616](#3616)) ([b81913b](b81913b)) * **telemetry:** measure how long roadmap items wait in each state ([#3601](#3601)) ([05c9ebd](05c9ebd)) ### Bug Fixes * **github:** send a GET again when its connection is lost ([#3608](#3608)) ([4528f49](4528f49)) * **roadmap:** accept a clean merge by a person on a branch ([#3603](#3603)) ([4fff490](4fff490)) * **roadmap:** the stage job waits for an open plan that creates a path ([#3613](#3613)) ([7e66373](7e66373)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This was referenced Nov 5, 2026
This was referenced Nov 6, 2026
dan-petty
added a commit
that referenced
this pull request
Nov 14, 2026
Issue #3794 pins the GitHub request budget of one metrics-row round. The row must stay near its pre-#3601 level of about 222 to 305 requests an hour over a period with two rollouts. The live measurement needs two deployments, so a pull request cannot take it. The offline test in this change pins the five reads of one round with one page of each listing, and fails on a new read or an extra page. Closes #3794 Change: `openspec/changes/archive/2026-11-14-3794-pin-metrics-row-request-budget/`
dan-petty
added a commit
that referenced
this pull request
Nov 16, 2026
…5850) Issue #3634 reports that the metrics row spent 627 to 1000 GitHub requests an hour after #3601, against 222 to 305 before it, because each new pod read the label events of every open Item again: the only copy of those times was the process dict `_item_label_times`. The 2000-request hourly budget holds every row, so the age metrics crowd out the others, and each rollout adds to the cost. The change keeps those times in `item-label-times.json` of each repository, versions each entry by the Item's `updated_at`, and caps the label-event reads of one round at 20. An offline test measures one new pod at 25 requests in its first round over 30 open Items: the 5 fixed reads of the row plus the 20 reads of the cap. Plans #3634 Change: `openspec/changes/3634-the-age-metrics-keep-their-reads/` --------- Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com> Co-authored-by: Daniel Petty <contact@danielpetty.com>
dan-petty
added a commit
that referenced
this pull request
Nov 19, 2026
Issue #3634 reports a metrics row that spent 627 to 1000 GitHub requests an hour after #3601, against 222 to 305 before it, because each new pod read the label events of every open Item again. This change keeps those label times in `item-label-times.json` of each repository, keyed by the `updated_at` of each Item, so a new pod reads no events of an Item that the file holds. A round reads the events of at most 20 Items, oldest entry first, so Items that move in each round do not keep another Item out. Measured cost of one new pod: 24 GitHub requests in its first round over 30 open Items, the 4 fixed reads of the row and 20 label-event reads. The count is the sum of `devops_cli_github_requests_total` for row `metrics` in one offline round against the GitHub fake. The plan said 25, because the fixed reads were 5 then; #6095 set `METRICS_ROW_GITHUB_REQUEST_BUDGET` to 4. Closes #3634 Change: `openspec/changes/archive/2026-11-18-3634-the-age-metrics-keep-their-reads/` --------- Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com> Co-authored-by: Daniel Petty <contact@danielpetty.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing shows how long a roadmap item waits in a state. Items wait in Ready, in Planned and as stopped drafts for hours or days before a person sees them.
This change adds three gauges. They are the age of the oldest open item in each state, the number of that item, and the age of the oldest claim. The metrics row of the Service sends them per repository. The age starts at the time of the label event that set the current label. The row reads those events only when a status or owner label changes.
This change adds one alert, RoadmapServiceItemStuck. It fires for an item that waits in blocked, or in ready with a plan, for more than 24 hours. The alert names the item. The change also adds one panel, Oldest Item Age by State, to the project dashboard.
Closes #2919
Change:
openspec/changes/archive/2026-11-05-2919-stuck-item-age-metrics-and-one/