Skip to content

fix(telemetry): the project items gauge counts the items of the project board by milestone, state, type and priority - #2290

Merged
dan-petty merged 2 commits into
mainfrom
fix/2263-project-items-gauge-counts-board
Oct 26, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/2263-project-items-gauge-counts-board

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The project items gauge took its counts from the REST milestones. Intake puts a new item in the backlog with no milestone, so an open item in no milestone was never counted. With no open milestone, the velocity dashboard showed 0 open items.

The gauge now counts the items of the project board, open and closed. The roadmap store reads them, and the Service job counts the items of the store it already opened. Each count has the labels milestone, state, type and priority. A label is empty when the item has no value for it, for example the milestone of an item in no milestone. devops gh metrics reads the board that .github/roadmap.toml names. It fails when it cannot read the board, so a failed read is never an empty board.

A series that stops arriving keeps its last sample in last_over_time. A label set that had items in the last snapshot and has none in the new one is therefore sent once as 0.

The panels "Items by Milestone" and "Active Items by State", the description of the instrument and docs/TELEMETRY.md describe what the gauge counts. The first panel shows an item in no milestone as none.

Closes #2263

Change: openspec/changes/archive/2026-10-26-2263-project-items-gauge-counts-board/

…ct board by milestone, state, type and priority

The gauge took its counts from the REST milestones, so an open item in no
milestone was never counted and the velocity dashboard showed 0 open items.
It now counts the items that the roadmap store reads from the board, with the
labels milestone, state, type and priority. A label set that left a snapshot is
sent once as 0, because Prometheus keeps the last sample of a series that stops.
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence for #2263.

Fail-to-pass. devops ci fail-to-pass --base origin/main exits 0. On the base, tests/test_github_metrics.py and tests/test_telemetry_instruments.py fail to collect, because the new names do not exist. tests/test_roadmap_run.py::test_the_metrics_job_walks_the_version_tags_of_its_own_clone fails on the base with 0.0 counted items where 1.0 is expected.

Local gate. uv run devops ci passes all 19 checks. The tests take 5m27s on this host. That is over the 5-minute budget and inside its 1-minute tolerance. The new tests take about 1s, so the time is in the existing set-up of the invariant tests.

Real repository. devops gh metrics --json, without --emit-telemetry, counts 195 open and 235 closed items. All 195 open items have no milestone, which is why the gauge showed 0. The board's own GraphQL totalCount is 196 open cards. The one card more is a draft issue, so it is no item. Before this change, the same gauge returned open 0.

Prometheus. label_replace(..., "milestone", "none", "milestone", "^$") sets milestone="none" on a series that has no milestone label. The query was run on the cluster's Prometheus.

Not checked. The numbers on the live dashboard. The roadmap Service has 0 replicas, so no snapshot arrives. When it runs, the same gauge also reaches Prometheus through the pod scrape and through OTLP, and a sum by (state) adds both. That is #2288. This pull request does not change it.

Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty marked this pull request as ready for review October 26, 2026 13:57
@dan-petty
dan-petty merged commit 853296c into main Oct 26, 2026
17 checks passed
@dan-petty
dan-petty deleted the fix/2263-project-items-gauge-counts-board branch October 26, 2026 13:57
dan-petty pushed a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.2](v0.6.1...v0.6.2)
(2026-10-26)


### Bug Fixes

* **ai:** the claude provider sends what current Claude models accept,
built by the anthropic SDK
([#2285](#2285))
([59471a4](59471a4))
* **ai:** the openai provider without ai.api_base_url calls the OpenAI
API's /v1 routes, built by the openai SDK
([#2286](#2286))
([a7dd605](a7dd605)),
closes [#1427](#1427)
* **ci:** pin ty in the dev group so a new release cannot fail uv check
on main ([#2284](#2284))
([3936fe6](3936fe6)),
closes [#2281](#2281)
* **security:** query documented radar api with token and mark failed
lookups unverified
([#2289](#2289))
([c52af09](c52af09))
* **telemetry:** the project items gauge counts the items of the project
board by milestone, state, type and priority
([#2290](#2290))
([853296c](853296c))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(telemetry): the project items gauge counts only issues in a milestone, so the velocity dashboard shows 0 open items while 239 are open

1 participant