Skip to content

fix(telemetry): keep one upstream status series per service - #4986

Merged
dan-petty merged 2 commits into
mainfrom
fix/4701-one-status-series
Nov 12, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4701-one-status-series

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The status gauges put the state in a label, so each indicator, and each component status, was its own series. The status panels took the max of the last value of each series over 30 days, so an old major series won over the current status.

  • emit_service_status_telemetry sends the service gauge by service only and the component gauge by service and component only. The value holds the state, so a new status replaces the value of the one series.
  • The two status panels read last_over_time(devops_cli_upstream_service_status{service="<service>"}[1h]) as an instant query, with no max(. A status older than one hour shows no data.
  • New promtool cases in tests/fixtures/dashboard_queries/project-metrics.yaml cover the two panels.

Closes #4701

Change: openspec/changes/archive/2026-11-12-4701-keep-one-upstream-status-series-per/

The status gauges put the state in a label, so each indicator and each
component status was its own series. The status panels took the max of
the last value of each series over 30 days, so an old outage won over
the current status.

The emitter now sends the service gauge by service only and the
component gauge by service and component only; the value holds the
state. The two status panels read the last value of the last hour.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/telemetry OpenTelemetry tracing spans, Prometheus metrics, and Jaeger labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Fail-to-pass. uv run devops ci fail-to-pass --base origin/main:

failed on base: tests.telemetry.test_service_status::test_a_new_component_status_replaces_the_value_of_the_component_series
failed on base: tests.telemetry.test_service_status::test_a_new_indicator_replaces_the_value_of_the_service_series
2 failed on base (2 failed and 11 passed in tests/telemetry/test_service_status.py; 0 errored).

The replay does not run the new promtool cases. Before the dashboard change, tests/prometheus/test_dashboard_queries.py failed with project-metrics.json panel 'GitHub Published Service Status' refId A: the case query is not the panel query (3 cases). On the head, uv run pytest tests/telemetry/test_service_status.py tests/prometheus/test_dashboard_queries.py tests/docs/test_docs.py tests/telemetry/test_telemetry_instruments.py tests/prometheus/test_k8s_monitoring_dashboards.py tests/grafana/test_grafana_dashboards.py: 216 passed.

Measurements (Prometheus, 2026-11-12, before the change).

  • time() - max_over_time(timestamp(devops_cli_upstream_service_status)[3d:1m]): github newest sample indicator="none", 581 s old; indicator="major" last written 40,431 s before. cloudflare newest minor, 581 s old; major 80,120 s old.
  • The panel query at the default range, max by (service) (last_over_time(devops_cli_upstream_service_status[30d])): 2 ("Major Outage") for both services.
  • count by (service, component) (last_over_time(devops_cli_upstream_component_status[7d])) > 1: 16 components with 2 to 5 series each, from the label status.

Live steps after the merge (no owner step; no ConfigMap or Secret change).

  1. Argo CD applies the dashboard at the merge. The Service sends the new series after the next release image rolls. Until then the panels read the label series of the last hour, which is one series when the indicator did not change in that hour.
  2. Two hours after the Service rollout, check: count by (service) (last_over_time(devops_cli_upstream_service_status[1h])) is 1 for each service, and count by (service, component) (last_over_time(devops_cli_upstream_component_status[1h])) is 1 for each component.
  3. Compare panel 22 with the indicator of the GitHub status API (https://www.githubstatus.com/api/v2/status.json, status.indicator) at the time of the check.
  4. The old label series stay in Prometheus until retention removes them. No panel reads them after one hour.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 09:01
@dan-petty
dan-petty merged commit 3e4ca56 into main Nov 12, 2026
25 checks passed
@dan-petty
dan-petty deleted the fix/4701-one-status-series branch November 12, 2026 12:06
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.118.0](v0.117.2...v0.118.0)
(2026-11-12)


### Features

* **ci:** devops ci stops its rows when timeout ends it
([#5031](#5031))
([1fa4e9c](1fa4e9c))
* **roadmap:** keep the stage gate problems as a list with a code
([#5022](#5022))
([5819627](5819627))
* **roadmap:** log one result line for each roadmap job attempt
([#4966](#4966))
([2b6fe3f](2b6fe3f))
* **telemetry:** record each CLI usage error by name and kind
([#4973](#4973))
([a179fd9](a179fd9))


### Bug Fixes

* **ai:** chat loads each persona prompt and challenger gets tools
([#5037](#5037))
([c40b0ad](c40b0ad))
* **ai:** keep the HTTP status of a Claude reply after retries
([#4976](#4976))
([5bf9466](5bf9466))
* **deps:** keep Renovate uv bumps green and groups on Monday
([#4987](#4987))
([b19e153](b19e153))
* **k8s:** raise the limits that 7 d of use shows are too low
([#5030](#5030))
([028c62b](028c62b))
* **roadmap:** a job posts no comment that repeats a recent one
([#4978](#4978))
([fff903a](fff903a))
* **service:** alert when GitHub cannot deliver a webhook
([#5045](#5045))
([2bfbfcb](2bfbfcb))
* **service:** delete the stream route that sends canned verified text
([#5038](#5038))
([e9d51b5](e9d51b5))
* **telemetry:** keep one upstream status series per service
([#4986](#4986))
([3e4ca56](3e4ca56))
* **tests:** remove the runner variable in the test floor
([#4988](#4988))
([093aa61](093aa61))


### Performance Improvements

* **ai:** make the ast graph walk and call search faster
([#5039](#5039))
([3b25cc6](3b25cc6)),
closes [#4662](#4662)
* **ci:** build the devcontainer only on its own inputs
([#4977](#4977))
([c5b15ac](c5b15ac))
* **ci:** test each merge once, on the push to main
([#5043](#5043))
([c6992b1](c6992b1))
* **tests:** remove fixed waste in six slow tests
([#4995](#4995))
([1c7044e](1c7044e))


### Code Refactoring

* **ai:** delete devops ai pipeline and persona leftovers
([#5044](#5044))
([d5fefde](d5fefde)),
closes [#4827](#4827)
* **openspec:** split big capabilities into nested ones
([#4981](#4981))
([dfb09bd](dfb09bd))
* **pr:** devops pr update acts only on a failed check
([#4990](#4990))
([aa4fa1a](aa4fa1a))

---
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/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(telemetry): keep one upstream status series per service

1 participant