Skip to content

feat(github): send GitHub request, throttle and GraphQL point metrics, and show them on the devops-cli dashboard - #2406

Merged
dan-petty merged 3 commits into
mainfrom
feat/814-github-request-metrics
Oct 28, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/814-github-request-metrics

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops-cli now sends metrics about its requests to GitHub, and the devops-cli dashboard shows them. Before this change, the rate limiter kept the counts only in the quota ledger of the identity, and only devops gh rate-limit read them.

  • devops_cli_github_requests_total, by resource: the rate limiter adds 1 for each attempt that it paces, a gh command of run_gh or a request of the GitHub session, and each retry. The resource is the rate-limit resource that the request spends, such as core, graphql or search.
  • devops_cli_github_throttle_wait_seconds, by resource: one observation for each throttle, the seconds that devops-cli waits before it sends the refused request again. histogram_count gives the throttles, and histogram_sum gives the wait.
  • devops_cli_github_graphql_points_total: the cost that each GraphQL answer reports in rateLimit.cost. A count of requests does not show this cost.
  • GitHubRateLimiter.record_throttle takes the resource of the refused request.
  • The new row "GitHub API" in devops-cli.json shows the requests and the throttles by resource, the throttle wait, and the GraphQL points.
  • docs/TELEMETRY.md lists the three metrics.

The change does not build the gauge of the GraphQL points left, the spend by repository of each Service round, or the Service pause gauge of the 2026-10-08 update. They come from the board reads of the Service, which #2399 removes (owner decision of 2026-10-28), and the Service does not run until #1647. The new points counter counts the GraphQL cost of every process, the Service included.

Closes #814

Change: openspec/changes/archive/2026-10-28-814-github-request-metrics/

…int metrics

Each attempt that the rate limiter paces adds 1 to devops_cli_github_requests_total by resource. Each throttle adds one observation of its wait to devops_cli_github_throttle_wait_seconds by resource. Each GraphQL answer adds the cost that it reports to devops_cli_github_graphql_points_total. record_throttle takes the resource of the refused request.

Refs #814
The new row "GitHub API" shows the requests by resource, the throttles and their wait by resource, and the GraphQL points.

Refs #814
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results before the push (worktree at e98b396..ae9afb2 before the rebase onto ad0114f):

  • The new tests failed first on their assertions, with no metric sent: tests/test_github_api_metrics.py (3 tests) and test_the_github_api_row_charts_requests_throttles_and_graphql_points (no "GitHub API" row).
  • uv run devops ci test: 11380 passed, 0 failed, in 412 s.
  • tests/test_telemetry_instruments.py, tests/test_grafana_dashboards.py and tests/test_k8s_monitoring_dashboards.py: 118 passed.
  • uv run devops openspec archive 814-github-request-metrics: every spec and change validates.

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 28, 2026 14:17
@dan-petty
dan-petty merged commit bded64b into main Oct 28, 2026
16 checks passed
@dan-petty
dan-petty deleted the feat/814-github-request-metrics branch October 28, 2026 14:43
dan-petty pushed a commit that referenced this pull request Oct 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.9.0](v0.8.3...v0.9.0)
(2026-10-28)


### Features

* **ai:** observe the Ollama slot wait by priority and chart its p95
([#2404](#2404))
([ffeeda4](ffeeda4))
* **github:** send GitHub request, throttle and GraphQL point metrics,
and show them on the devops-cli dashboard
([#2406](#2406))
([bded64b](bded64b))
* **k8s:** gpu row panels for clock-event reasons, power against the
enforced limit and pcie throughput
([#2409](#2409))
([21f023c](21f023c)),
closes [#821](#821)
* **review:** a review session records its head commit and clean tree,
and says whether it is on merged code
([#2434](#2434))
([8b4ed46](8b4ed46))
* **review:** an issue filed from a review finding carries its
fingerprint, and the review leaves out a finding that an issue already
carries ([#2428](#2428))
([acace03](acace03))
* **review:** the feedback export counts each review subject once and
keeps every human verdict
([#2417](#2417))
([73d1807](73d1807))
* **roadmap:** act as GitHub App devops-roadmap instead of a machine
account ([#2411](#2411))
([d739a47](d739a47)),
closes [#1647](#1647)
* **roadmap:** labels and milestones hold each item's status, priority,
value and effort, and no roadmap job reads or writes the project board
([#2435](#2435))
([84f02a1](84f02a1)),
closes [#2399](#2399)
* **roadmap:** refine investigates open questions with code and web
tools and decides design questions by the best practice
([#2410](#2410))
([890e228](890e228)),
closes [#2398](#2398)
* **telemetry:** count embedding cache lookups and send every metric
through a declared instrument
([#2416](#2416))
([19412fa](19412fa))


### Bug Fixes

* **git:** ignore missing files when measuring directory size during
reclaim ([#2438](#2438))
([4226904](4226904))
* **security:** scan all namespaces with Popeye when no namespace is
given ([#2436](#2436))
([4d5f789](4d5f789))
* **security:** scan_uv_audit runs a uv audit adapter that audits the
lockfile as it is
([#2446](#2446))
([0b2d005](0b2d005)),
closes [#2106](#2106)

---
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.

feat(github): github api request and throttle counters for the devops-cli dashboard

1 participant