Skip to content

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

Closed

Description

@dan-petty

Context & Rationale

The GitHub rate limiter keeps its total requests, throttles and wait seconds in a local JSON file (src/devops_cli/github/rate_limiter.py:320-345), so no dashboard can see API use or throttling.

Scope & Deliverables

  • Deliverable:
    • Add to INSTRUMENTS (src/devops_cli/telemetry/instruments.py:96-105): a counter devops_cli_github_requests_total by resource, a counter devops_cli_github_throttles_total, and a histogram of throttle wait seconds.
    • Add a panel to devops-cli.json.
  • Acceptance criteria:
    • A throttled request sends one throttle increment and one wait observation.
    • The panel queries pass tests/test_telemetry_instruments.py, and their series sit inside rate( or increase(.
  • Constraint: INSTRUMENTS supports only counters and histograms (instruments.py:17-21). Remaining quota would be a gauge from short-lived processes, so it stays out of scope.

Strategic Alignment

  • Milestone: Backlog
  • Depends on: none

Update 2026-10-08: refinement

The Constraint no longer holds: gauges exist (#1253), and the Service has /metrics. Built here, once: devops_cli_github_graphql_remaining from each round's budget read (roadmap/run.py:926), spent points by repo, and devops_cli_service_paused_until_seconds (server/service.py:74).

Activity

  1. added
    type/feature
    scope/telemetry
    priority/p3-low
    on Oct 1, 2026
  2. added
    scope/github
    on Oct 2, 2026
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Premise update (2026-10-08): the Constraint "INSTRUMENTS supports only counters and histograms ... Remaining quota would be a gauge from short-lived processes, so it stays out of scope" no longer holds.

    Suggested amendment: bring into scope, for the service, a GraphQL points-left gauge and a points-spent counter by repo, read from the rateLimit that GitHub returns. #1361 adds only a per-round spend log line and leaves these metrics to this item.

  4. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    The pull request for this item builds the request counter, the throttle wait histogram and a GraphQL points counter, with a "GitHub API" row in devops-cli.json. It does not build three parts of the 2026-10-08 update, because a newer project direction removes their source.

    Evidence checked on origin/main bb46660. The pull request closes this item with the parts above left out. A new item can add a Service gauge when the Service runs again under #1647.

  5. added a commit that references this issue on Oct 28, 2026
    bded64b
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

    priority/p3-lowscope/githubscope/telemetrytype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions