Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2978091
docs(openspec): plan #2919 stuck item ages
dan-petty Nov 5, 2026
32cf5f3
feat(telemetry): declare roadmap age gauges
dan-petty Nov 5, 2026
2e1204f
feat(roadmap): read the label changes of one issue
dan-petty Nov 5, 2026
f727cdc
feat(telemetry): send the roadmap item ages from the metrics report
dan-petty Nov 5, 2026
4da47b6
feat(roadmap): the metrics row of the service sends item ages
dan-petty Nov 5, 2026
3074eda
feat(k8s): alert on a roadmap item stuck for a day
dan-petty Nov 5, 2026
a0e8ed0
feat(k8s): chart the oldest roadmap item age by state
dan-petty Nov 5, 2026
11a2fc4
docs(telemetry): document the roadmap age gauges
dan-petty Nov 5, 2026
8259ccc
docs(openspec): archive 2919 stuck item age metrics
dan-petty Nov 5, 2026
ab52977
Revert "docs(openspec): archive 2919 stuck item age metrics"
dan-petty Nov 5, 2026
dc79d03
fix(alerts): name the item only when its number is known
dan-petty Nov 5, 2026
6627189
fix(metrics): keep the label times of each repo apart
dan-petty Nov 5, 2026
9299ca8
docs(telemetry): write the age gauge text in plain language
dan-petty Nov 5, 2026
31b53d7
docs(alerts): write the stuck item alert text in plain language
dan-petty Nov 5, 2026
ce37aa9
docs(adr): note the item age reads in ADR 0016
dan-petty Nov 5, 2026
8156c42
docs(k8s): list the items fixture in the runbook
dan-petty Nov 5, 2026
cd58b28
docs(openspec): write the change in plain language
dan-petty Nov 5, 2026
d4d4d81
docs(openspec): archive 2919 stuck item age metrics
dan-petty Nov 5, 2026
dae7ceb
Revert "docs(openspec): archive 2919 stuck item age metrics"
dan-petty Nov 5, 2026
a0b6d59
docs(telemetry): end the age gauge text without a doubled period
dan-petty Nov 5, 2026
b1ee73b
docs(openspec): archive 2919 stuck item age metrics
dan-petty Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ writes by name.
| `devops_cli_roadmap_refine_comments_capped_total` | Counter | `1` | Refine comments that the cap on refine's comments on one item in 24 hours stopped: one count for each newest comment on an item that the cap left with no answer. The item waits on a person and takes no place under the round's limit. A later round that finds no newer comment on the item does not count it again. |
| `devops_cli_roadmap_alternatives_total` | Counter | `1` | Checks of open items for an open tool that covers them, by verdict: covers, partly, none or not-applicable. One count for each check that the alternatives job writes to an item. A check that fails, or that the job skips because a person changed the item, counts nothing. |
| `devops_cli_roadmap_stage_total` | Counter | `1` | Items that a stage round handled, one count for each item, by result: staged for an item written as a branch and a draft pull request, needs_split for an item stopped on a task group over the budget, failed for an item that failed in the plan or in the writes, and skipped for an item the job left out with a reason. A plan with no write counts nothing. |
| `devops_cli_roadmap_item_age_seconds` | Gauge | `s` | Age of the oldest open roadmap item in each status, by repo, state and plan. The state is the status. Plan is true when the item holds a stage pull request. That pull request waits for a person. The age is the time since the status label was set. Zero when no item is in the pair. |
| `devops_cli_roadmap_oldest_item_number` | Gauge | `1` | Issue number of the oldest open roadmap item in each pair of repo, state and plan. The pair is the one that devops_cli_roadmap_item_age_seconds reports. Zero when no item is in the pair. |
| `devops_cli_roadmap_claim_age_seconds` | Gauge | `s` | Age of the oldest claim on an open roadmap item, by repo. The age is the time since the owner label was set. Zero when no open item holds a claim. |
| `devops_cli_embedding_cache_lookups_total` | Counter | `1` | Embedding cache lookups, one for each text that an embedding request gets, by result: hit or miss. A hit names its tier: memory for the cache of the process, or valkey. |
| `devops_cli_embedding_cache_size` | Gauge | `1` | Embeddings that the memory cache of the process held after its last embedding request. |
| `devops_cli_rag_embedding_batch_size` | Gauge | `1` | Texts in each embedding request after the last change of the adaptive batch size. |
Expand Down
1 change: 1 addition & 0 deletions docs/adr/0016-labels-hold-the-roadmap-items-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ On 2026-10-28 the owner decided that labels and milestones hold an Item's state,
- `.github/roadmap.toml`, the board read of the store, the `Job record` field, the board's GraphQL budget probe, the GraphQL spend line of a round and the Service's pause after a board budget refusal are deleted. `devops gh project` keeps its own board reads in `github/project_read.py`, for the owner's board.
- `devops pr check-readiness` blocks a pull request whose one issue holds no `priority/*` label.
- The open issues of each managed repository get their labels from their board values once. A person runs that migration.
- The age metrics of the roadmap Service (#2919) read the label events of an open Item. The rejected option above named that read as a cost for each Item. The metrics row reads an Item again only when its status or owner label changes. The first round after a start reads each open Item with a status. Later rounds read only the Items that changed.
8 changes: 7 additions & 1 deletion k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,15 @@ The rule group `roadmap-service-activity` watches what the Service writes, the d
| `RoadmapServiceSelfDeliveriesHigh` | The Service got more than 150 webhook deliveries of its own writes in 1 hour. Each write can come back as one delivery, so another bot or workflow can answer each write of the Service. | — | warning | Find the repository in the delivery log lines of the Service (`outcome` `self`), and find the bot or workflow that writes after the Service on it. Turn that repository's webhook off (stop switch, step 5) until the loop is broken. |
| `RoadmapServiceFirecrawlRefused` | Firecrawl refused a web search of the Service in the last hour: HTTP 402 when the account has no credits, HTTP 429 at its rate limit. Refine goes on without the search results. | — | warning | Read the usage page of the Firecrawl account. Add credits or wait for the rate limit to end. To stop the searches, a person removes the key `DEVOPS_CLI_FIRECRAWL_API_KEY` from Secret `devops/devops-cli`, then restarts the Service. |

The rule group `roadmap-service-items` watches how long an open roadmap item stays in one state. The metrics row of the Service sends the age of the oldest item in each state, and its number (#2919).

| Alert | Fires when | For | Severity | Do this |
| :--- | :--- | :--- | :--- | :--- |
| `RoadmapServiceItemStuck` | An item has stayed in `blocked`, or in `ready` with a plan, for more than 24 hours. The summary names the item number. | — | warning | Run `devops roadmap inbox` to see the items that wait for a person. Move the item on. Its age starts again when its status changes. |

No alert leaves the cluster until the Secret `monitoring/alertmanager-mattermost` exists (Alerting, Receiver). Creating it is a step for the owner, who chose Mattermost as the route for the alerts (#1391, #1392). Until then, read the alerts in Grafana (Alerting, with the `Alertmanager` datasource) or on the Alerts page of Prometheus.

`tests/test_k8s_monitoring_alerting.py` pins each rule and runs the pinned promtool (`devops install-tools --tool promtool`) on it. `promtool test rules` runs the unit tests of each group, in `tests/fixtures/prometheus_rules/roadmap_service_tests.yaml`, `roadmap_service_webhooks_tests.yaml` and `roadmap_service_activity_tests.yaml`: each alert fires on a sample series with the labels and annotations that the tests pin, and stays quiet on a normal series and on the same series of another job. To run them by hand, write the group to the file that the tests' `rule_files` names, then run `promtool test rules <tests-file>` in that directory.
`tests/test_k8s_monitoring_alerting.py` pins each rule and runs the pinned promtool (`devops install-tools --tool promtool`) on it. `promtool test rules` runs the unit tests of each group. The tests are in `tests/fixtures/prometheus_rules/roadmap_service_tests.yaml`, `roadmap_service_webhooks_tests.yaml`, `roadmap_service_activity_tests.yaml` and `roadmap_service_items_tests.yaml`. Each alert fires on a sample series with the labels and annotations that the tests pin. It stays quiet on a normal series and on the same series of another job. To run them by hand, write the group to the file that the tests' `rule_files` names. Then run `promtool test rules <tests-file>` in that directory.

#### Go-live check

Expand Down
48 changes: 39 additions & 9 deletions k8s/monitoring/dashboards/project-metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,39 @@
}
]
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"description": "The age of the oldest open roadmap item in each state, and the age of the oldest claim on an open item. The age is the time since the status or owner label was set. It shows the latest value of each series in the time range, and no data when none was sent in it.",
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": { "axisCenteredZero": false, "drawStyle": "line", "lineInterpolation": "smooth" },
"unit": "s"
}
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 34 },
"id": 24,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"title": "Oldest Item Age by State",
"type": "timeseries",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"expr": "max by (state) (last_over_time(devops_cli_roadmap_item_age_seconds[$__range]))",
"legendFormat": "{{state}}",
"refId": "A"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"expr": "max(last_over_time(devops_cli_roadmap_claim_age_seconds[$__range]))",
"legendFormat": "oldest claim",
"refId": "B"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 34 },
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 42 },
"id": 15,
"title": "GitHub Traffic & Repository Engagement",
"type": "row"
Expand All @@ -355,7 +385,7 @@
"unit": "short"
}
},
"gridPos": { "h": 4, "w": 8, "x": 0, "y": 35 },
"gridPos": { "h": 4, "w": 8, "x": 0, "y": 43 },
"id": 16,
"options": {
"colorMode": "value",
Expand Down Expand Up @@ -402,7 +432,7 @@
"unit": "short"
}
},
"gridPos": { "h": 4, "w": 8, "x": 8, "y": 35 },
"gridPos": { "h": 4, "w": 8, "x": 8, "y": 43 },
"id": 17,
"options": {
"colorMode": "value",
Expand Down Expand Up @@ -449,7 +479,7 @@
"unit": "short"
}
},
"gridPos": { "h": 4, "w": 8, "x": 16, "y": 35 },
"gridPos": { "h": 4, "w": 8, "x": 16, "y": 43 },
"id": 18,
"options": {
"colorMode": "value",
Expand Down Expand Up @@ -496,7 +526,7 @@
"unit": "short"
}
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 39 },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 47 },
"id": 19,
"options": {
"displayMode": "gradient",
Expand Down Expand Up @@ -535,7 +565,7 @@
"unit": "short"
}
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 39 },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 47 },
"id": 20,
"options": {
"displayMode": "gradient",
Expand All @@ -561,7 +591,7 @@
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 47 },
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 55 },
"id": 21,
"title": "Upstream Platform Operational Status",
"type": "row"
Expand Down Expand Up @@ -596,7 +626,7 @@
},
"overrides": []
},
"gridPos": { "h": 4, "w": 12, "x": 0, "y": 48 },
"gridPos": { "h": 4, "w": 12, "x": 0, "y": 56 },
"id": 22,
"options": {
"colorMode": "value",
Expand Down Expand Up @@ -652,7 +682,7 @@
},
"overrides": []
},
"gridPos": { "h": 4, "w": 12, "x": 12, "y": 48 },
"gridPos": { "h": 4, "w": 12, "x": 12, "y": 56 },
"id": 23,
"options": {
"colorMode": "value",
Expand Down
22 changes: 22 additions & 0 deletions k8s/monitoring/prometheus-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,28 @@ serverFiles:
annotations:
summary: 'Firecrawl refused web searches of the roadmap Service with HTTP {{ $labels.result }} in the last hour'
description: "Firecrawl refused a web search of the roadmap Service with HTTP {{ $labels.result }}: 402 when the account has no credits, 429 at its rate limit. Refine goes on without the results (k8s/README.md, Roadmap service)."
# The age of the oldest roadmap item in each state (#2919). The metrics row sends the age and
# the number of the oldest item of each pair of a state and a plan flag once in each round. So
# a series has a sample in each round, and the rule reads its last sample of the last 30
# minutes, which is longer than a round (#2505). The value 86400 is one day, a literal as the
# other roadmap rules keep theirs: a person who wants another value edits this line and its
# unit test.
- name: roadmap-service-items
rules:
# A blocked item, or a ready item with a plan that waits for a person, stays in its state
# for more than a day. The summary names the item number of the same repository, state and
# plan.
- alert: RoadmapServiceItemStuck
expr: >-
max by (repo, state, plan) (last_over_time(devops_cli_roadmap_item_age_seconds{job="roadmap-service", state="blocked"}[30m])) > 86400
or
max by (repo, state, plan) (last_over_time(devops_cli_roadmap_item_age_seconds{job="roadmap-service", state="ready", plan="true"}[30m])) > 86400
for: 0m
labels:
severity: warning
annotations:
summary: 'Item {{ with printf "max by (repo, state, plan) (last_over_time(devops_cli_roadmap_oldest_item_number{job=\"roadmap-service\", repo=%q, state=%q, plan=%q}[30m]))" $labels.repo $labels.state $labels.plan | query }}#{{ . | first | value | printf "%.0f" }} {{ end }}of {{ $labels.repo }} has been in state {{ $labels.state }} for {{ $value | humanizeDuration }}'
description: "An item of the roadmap stayed in one state for more than 24 hours. Run devops roadmap inbox to see the item (k8s/README.md, Roadmap service)."
- name: mattermost
rules:
- alert: MattermostUnavailable
Expand Down
Loading
Loading