Skip to content

fix(monitoring): keep empty error counters healthy - #9710

Merged
Git-on-my-level merged 1 commit into
mainfrom
observability/stackdriver-no-data-hygiene
Jul 14, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
observability/stackdriver-no-data-hygiene

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • restore noDataState: OK for the six Stackdriver backend/backend-sync/backend-integration 4XX/5XX count alerts in the deployable combined Grafana export
  • add a regression contract covering zero-error semantics and combined/split alert-export drift

Root cause and durable guard

Stackdriver returns no series when these error counters are zero. The grouped alert exports correctly treated that as OK, but a Grafana export sync reset the combined deploy artifact to Alerting. Grafana then raised false critical NoData alerts. The contract test checks every affected rule's Stackdriver counter shape and requires the combined and split exports to agree on OK.

Verification

  • uv run --with pytest pytest -q backend/tests/unit/test_monitoring_alert_rule_contract.py — 2 passed
  • python3 -m json.tool backend/charts/monitoring/alert-rules.json
  • make preflight

Deferred / rollout

This is a version-controlled provisioning correction only. It does not mutate remote Grafana, alert routing, workloads, traffic, credentials, or public status. Production application of the reviewed provisioning artifact remains subject to the normal monitoring deployment/change-control path.

Review in cubic

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring alert-rule fix with a contract test; holding the merge — noDataState changes affect prod alerting, Nik's call.

Stackdriver returns no series when these backend 4xx/5xx counters are zero. The combined Grafana export had drifted to noDataState=Alerting, creating false critical alerts even though the split rule exports were correctly OK. Restore OK for all six backend/backend-sync/backend-integration error-count rules and add a contract test that also detects combined/split export drift.

Verified: uv run --with pytest pytest -q backend/tests/unit/test_monitoring_alert_rule_contract.py (2 passed); python3 -m json.tool backend/charts/monitoring/alert-rules.json; make preflight.
@Git-on-my-level
Git-on-my-level force-pushed the observability/stackdriver-no-data-hygiene branch from 718b633 to 521030e Compare July 14, 2026 16:16
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Rebased onto latest main (was 42 commits behind) and verified CI.

  • PR branch force-pushed with the identical 2-file diff (backend/charts/monitoring/alert-rules.json, backend/tests/unit/test_monitoring_alert_rule_contract.py); no content changes.
  • Local verification: pytest -q tests/unit/test_monitoring_alert_rule_contract.py — 2 passed; python3 -m json.tool on alert-rules.json — valid; PR preflight 14/14 checks passed.
  • CI: all checks pass (Backend unit suite, Hermetic Backend E2E, Formatting, Hygiene, Desktop Swift, Public Developer API contract).
  • Merge state: APPROVED / CLEAN / MERGEABLE.

@Git-on-my-level
Git-on-my-level merged commit 2b5f90f into main Jul 14, 2026
21 checks passed
@Git-on-my-level
Git-on-my-level deleted the observability/stackdriver-no-data-hygiene branch July 14, 2026 18:29
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.

2 participants