Skip to content

Report degraded stats writes and invalid health readings - #96

Merged
mzupan merged 1 commit into
mainfrom
codex/stats-persistence-health
Nov 15, 2026
Merged

mzupan merged 1 commit into
mainfrom
codex/stats-persistence-health

Conversation

@mzupan

@mzupan mzupan commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Stacked after #95. Merge in order #94, #95, #96, #97, #98, #99. This diff contains only this finding relative to its base.

Failed stats reads were converted into zero values, and failed stats/snapshot inserts still produced a successful stats-engine cycle. Keep unavailable readings out of emitted values, retain existing valid health gauges, expose per-probe validity and last successful observation, and return a degraded cycle when a required read or persistence step fails.

Add self-metric write outcomes, latency and last-success timestamps by fixed stage/table. Both gauge and counter snapshot inserts are attempted even if one fails, keeping the scrape registry useful during ClickHouse trouble.

Validation: nine stats-engine tests passed, including failed-probe stale-value retention and partial snapshot persistence. cargo fmt --check, git diff --check and cargo clippy --all-targets passed. Existing repository warnings prevent strict -D warnings. No tenant, query-text or error-string labels are added.

@mzupan
mzupan force-pushed the codex/stats-persistence-health branch from 42fbdc7 to 7e5e6e8 Compare November 15, 2026 22:45
@mzupan
mzupan merged commit bfb15f7 into main Nov 15, 2026
5 checks passed
@mzupan
mzupan deleted the codex/stats-persistence-health branch November 15, 2026 22:45
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.

1 participant