Skip to content

feat(telemetry): send stage step seconds and gate refusal counts - #4176

Merged
dan-petty merged 7 commits into
mainfrom
feat/4066-stage-step-seconds-gate-counter
Nov 8, 2026
Merged

dan-petty merged 7 commits into
mainfrom
feat/4066-stage-step-seconds-gate-counter

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The stage job has one metric, devops_cli_roadmap_stage_total, with the label result only. No metric shows how long each step of a stage round takes, so a slow step hides in the seconds of the whole row (#4058). No counter shows which gate refused a plan: check_proposal joins the problems of all gates, and the name of the gate is lost (#4066). This is wave 8 of the staging plan in the tracker #3027.

Closes #4066

Change: openspec/changes/archive/2026-11-08-4066-stage-step-seconds-gate-counter/

@dan-petty dan-petty added type/feature Type feature: a new function scope/telemetry OpenTelemetry tracing spans, Prometheus metrics, and Jaeger labels Nov 8, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test record (not part of the squash message).

Fail-to-pass: this is a feature, so there is no fail-to-pass run. The new tests failed on the base for the right reason: uv run devops ci test tests/telemetry/test_roadmap_stage_steps.py tests/roadmap/test_roadmap_failure.py gave 13 failed (instruments not declared, StepName without select, gate and review, no samples sent).

Full CI (flock .data/agent/ci.lock uv run devops ci, log .data/agent/logs/ci-4066.log): exit 0, all 25 rows pass on the tree before the rebase. The test row took 10m 1s because of host load (#3593). The full CI did not run again after the rebase onto origin/main. Main had added the gate trace, so the gate count is now 16, not 15. Commit 1e47c12 passes the trace facts through the timed gate step and states 16 series. After that fix these narrow runs pass: tests/telemetry, tests/roadmap failure tests, stage gate tests (494), tests/roadmap/stage and implement (3268), mypy on the changed files, devops docs generate --check, devops openspec check. The GitHub checks of this pull request now run the full set on the final tree.

Label scheme: ROADMAP_STEP_SECONDS uses the labels repo, row, step, result. The issue #4067 follows and uses the same scheme for the implement steps. Keep it. The observe_step(repo, row, step) helper in roadmap/step_metrics.py is shared with #4067.

Notes: the issue says 14 gates. ProposalGate has 16 members on this base, so the counter has at most 16 series. A gate runs more than once per item (first reply, split, retry, repair), so the gate samples and refusal counts are per call. No setting changed, so the ConfigMap needs no change.

@dan-petty
dan-petty marked this pull request as ready for review November 8, 2026 19:26
@dan-petty
dan-petty merged commit a6ddc30 into main Nov 8, 2026
25 checks passed
@dan-petty
dan-petty deleted the feat/4066-stage-step-seconds-gate-counter branch November 8, 2026 19:27
dan-petty pushed a commit that referenced this pull request Nov 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.93.0](v0.92.1...v0.93.0)
(2026-11-08)


### Features

* **roadmap:** retry a suspended row after its failure-class wait
([#4175](#4175))
([b5254d7](b5254d7)),
closes [#4065](#4065)
* **telemetry:** send stage step seconds and gate refusal counts
([#4176](#4176))
([a6ddc30](a6ddc30))

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

scope/telemetry OpenTelemetry tracing spans, Prometheus metrics, and Jaeger type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(telemetry): step seconds and a gate counter for the stage row

1 participant