Repository navigation
Closed
Labels
priority/p2-mediumPriority P2: standard workscope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Description
Problem (re-scoped 2026-10-25)
The Project & Engineering Velocity dashboard (k8s/monitoring/dashboards/project-metrics.json) shows no data on most panels.
State of main (28c1607), checked on 2026-10-25:
- The project metrics are gauges (fix(telemetry): classify project metrics and upstream status snapshot instruments as gauges #1253), and
devops_cli_project_release_interval_daysis a native histogram (fix(telemetry): delta metrics from one process can reach the collector out of order #792, fix(monitoring): the Grafana rate panels hold two samples, the dashboard queries match the live series, and the k8s-monitoring values use the chart's documented settings #1958). Panels 3, 4 and 5 read the histogram throughlast_over_time(...[$__range]). - The roadmap Service emits the metrics every
DEFAULT_ROADMAP_METRICS_INTERVAL_MINUTES(15) in itsmetricsjob (_run_metrics_adapterinsrc/devops_cli/roadmap/run.py), anddevops gh metrics --emit-telemetryemits them by hand. The roadmap Service is at 0 replicas now. - Panels 2, 7, 8, 10, 11, 13, 14 and 16 to 23 read the gauges as plain selectors, or through
max(/sum(with no range. Prometheus finds a plain selector only within 5 minutes of a sample, so with a 15-minute interval the panels are empty for about two thirds of the time, and empty all the time while nothing emits. The stat panels addor vector(0), so they show a false 0. The read-only probe of 2026-10-23 (comment above) saw 6 of 20 panels with data. test_every_series_is_read_through_rate_or_increaseskipsproject-metrics.json, so no test catches a gauge that is read with no range.- The 13 project gauges end in
_total, for exampledevops_cli_project_commits_total. Prometheus keeps_totalfor counters, so each consumer reads these gauges as counters.
Proposed remedy
- Each gauge panel reads the latest snapshot with
last_over_time(<metric>[$__range]), grouped by the same labels as now. The stat panels dropor vector(0), so a panel with no snapshot shows no data instead of 0. - The 13 project gauges drop
_total:devops_cli_project_releases,devops_cli_project_commits,devops_cli_project_prs,devops_cli_project_ci_runs,devops_cli_project_items,devops_cli_project_traffic_views,devops_cli_project_traffic_views_uniques,devops_cli_project_traffic_clones,devops_cli_project_traffic_clones_uniques,devops_cli_project_traffic_referrers,devops_cli_project_traffic_paths,devops_cli_project_starsanddevops_cli_project_forks. Pre-1.0, nothing is kept for compatibility. - The dashboard invariant reads each series by its kind, in every devops-cli dashboard with no exception: a counter through
rate(orincrease(, a gauge throughlast_over_time(, a histogram through either. A second invariant: a gauge name never ends in_total, and a counter name always does.
Moved out
- Emission when
devops ghordevops pris used: the roadmap Service'smetricsjob emits the snapshot every 15 minutes, so no trigger on command use is needed. - The gauges
devops_cli_service_paused_until_secondsanddevops_cli_github_graphql_remaining, which a comment of 2026-10-08 folded in from fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400: a separate item.
Acceptance criteria
- Each series of each devops-cli dashboard is read through the function of its kind, and a test fails for a gauge read with no range.
- No gauge name ends in
_total, and every counter name does; a test checks each instrument. -
docs/TELEMETRY.mdnames the gauges by their new names. -
uv run devops cipasses.
Metadata
Metadata
Assignees
Labels
priority/p2-mediumPriority P2: standard workscope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 8, 2026
Scope handed over by #1358 (in review for v0.2.29). Once it merges, the roadmap Service's metrics job walks each repository's own clone, so these paths stop being idle:
_get_git_tag_entries,github/metrics.py:144-157) should raise, and the emitter records nothing for that run, as the REST readers will under the criterion absorbed from fix(gh): project metrics read every page and fail closed instead of reporting zero #931. fix(roadmap): the metrics job walks release tags in each repository's own clone, and a missing or type-less labels.yml stops intake as a configuration error before any model call #1358 makes a clone failure fail the job, but a failed tag or REST read still only warns.repolabel on every project instrument, stars, forks and traffic included (telemetry/instruments.py:168-215). With eight repositories and norepolabel:devops_cli_project_releases_totalchanges from run to run with whichever repository ran last;commits_totalandprs_total{release=...}from different repositories land in the same series, and tag names collide (v0.1.0exists in more than one repository);_record_releases_breakdownrunsclear_metricthen oneset_gaugeper release, each under the lock but not as one step, so two repositories finishing together can leave the union of their release series in a scrape.PROJECT_RELEASE_INTERVAL_DAYSis an OTLP histogram (metrics.py:556), and every run re-observes every release interval, so_countand_sumgrow every 15 minutes for the same data. One gauge per release, as proposed here, removes that.get_release_cadence_metricsruns two git processes per tag for all tags, then keeps the last 10 (metrics.py:222-245): about 68 git processes per run for this repository. Slicing to the last 10 tags before the walk avoids that.devops gh metrics --repo Xfrom a checkout of another repository should fail and name both, instead of reporting the checkout's tags under X.dan-petty commentedon Oct 8, 2026
Addition from #1400 (in review for v0.2.29): #1400 logs the Service's round pause and each round's GraphQL spend, but Prometheus has no series for either, so alerting on a paused Service needs Loki. Since this item makes state metrics gauges, include two:
devops_cli_service_paused_until_seconds, set by the Service's round pause (0 when none), anddevops_cli_github_graphql_remaining, set from each round's closing budget read. Folded here instead of a new issue because the agent filing quota (#1153) is spent for this cycle.dan-petty commentedon Oct 22, 2026
Proposal needs splitting into 2 items at 6c713ee (see proposed design in issue body).
dan-petty commentedon Oct 23, 2026
A read-only probe on 2026-10-23 ran every panel query of this dashboard. 6 of 20 panels have data. Two causes empty the rest:
devops_cli_project_release_interval_daysas a native histogram since fix(telemetry): delta metrics from one process can reach the collector out of order #792, and Prometheus stores it under the bare name. Panels 3, 4 and 5 still query_bucket,_sumand_count. These forms return data: panel 3histogram_avg(sum(last_over_time(devops_cli_project_release_interval_days[$__range]))), panel 4histogram_quantile(0.5, sum(last_over_time(devops_cli_project_release_interval_days[$__range])))(and 0.95), panel 5histogram_avg(sum by (release) (last_over_time(devops_cli_project_release_interval_days[$__range]))).sum by (release) (last_over_time(devops_cli_project_commits_total[$__range]))returns 28 series at the 30-day default range. Panels 25 to 27 already use this form. Stats 16 to 18, 22 and 23 show a false 0 fromor vector(0).telemetry/instruments.pymaps a histogram to the classic names in itsseriesproperty, so the tests pass with the stale names. #1955 fixes that mapping for the devops-cli dashboard; this item keeps the Project dashboard queries.fix(monitoring): the Grafana rate panels hold two samples, the dashbo…
fix(roadmap): intake calls a candidate a duplicate only when it asks …
dan-petty commentedon Oct 25, 2026
This item cannot be built as written. PR #1253 already reclassified the inventory instruments as gauges. PR #792 and PR #1958 established that
devops_cli_project_release_interval_daysis an exponential native histogram. Panels 3 through 5 already usehistogram_avgandhistogram_quantile. The live series keep the_totalsuffix.The roadmap service runs the periodic metrics collection in
roadmap/run.py. The maintainer recorded on 2026-10-22 that this proposal needs a split into two items. The on-use command trigger is no longer needed. Rule 2 forbids compensating code when an item cannot be built as written. We return this item to New for refinement.[-]fix(telemetry): project metrics are gauges emitted when devops gh or pr is used, and the velocity dashboard reads the latest snapshot[/-][+]fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix[/+]