Skip to content

fix(observability): SLO coherence -- rules, scrapes, retention, dashboard - #147

Merged
vovinacci merged 3 commits into
mainfrom
fix/slo-coherence
Jul 13, 2026
Merged

fix(observability): SLO coherence -- rules, scrapes, retention, dashboard#147
vovinacci merged 3 commits into
mainfrom
fix/slo-coherence

Conversation

@vovinacci

Copy link
Copy Markdown
Owner

Why

Repo review round: the latency error-budget panel showed a permanent false violation, SLO.md documented a metric that does not exist, and several rule/config incoherences. Companion to #146 (which makes DELETE visible to the endpoint label these rules filter on).

Change model

  • Affected components:
    • prometheus_slo_rules.yml: new slo:latency:error_budget_burn7d + latency target rule; duplicate error-rate ratio/budget rules dropped (byte-identical to availability, unused by the dashboard); endpoint regex widened with /items/{item_id}.
    • prometheus.yml: loki + alloy own-metrics scrape jobs.
    • loki/config.yml: deprecated table_manager removed (compactor owns retention on tsdb); reject_old_samples_max_age aligned to the 24h retention.
    • dashboard: burn panel repointed to the new burn rule; 5xx gauge cap removed; log panel filters container_name (the label Alloy sets).
    • SLO.md: formulas and metric names synced to the shipped rules; grafana.ini comment matched to its value.
  • Hard rules touched (by number, see AGENTS.md): rule 11 (dashboards and docs ship with the change -- this IS that change).
  • Assumptions:
  • Plan: rules + scrape + retention + dashboard + doc sync, single commit.

Checklist

  • make ci green locally; promtool check config + rules (14 rules), loki -verify-config, dashboard JSON validated
  • Tests, docs, and dashboards ship with this change (SLO.md + dashboard updated in the same PR)
  • Mechanical and logic changes are not mixed in this PR

🤖 Generated with Claude Code

vovinacci and others added 2 commits July 13, 2026 09:39
…oard

Repo review round, observability findings:

- dashboard burn panel plotted slo:latency:error_budget7d (~0.05 when
  healthy) on a positive-means-violation scale: permanent false red.
  New slo:latency:error_budget_burn7d rule (budget - 0.05 allowance),
  panel repointed; latency target rule added for symmetry.
- slo:error_rate:ratio7d and error_budget7d were byte-identical to the
  availability rules and unused by the dashboard -- dropped, with a
  NOTE in the rules file; burn now derives from actual_5xx_ratio7d.
- endpoint regex widened to include /items/{item_id}: the backend now
  labels by route template (PR #146), making DELETE visible to SLOs
  for the first time.
- Prometheus scrapes loki and alloy own metrics (previously only their
  containers via cadvisor).
- Loki: deprecated table_manager block dropped (compactor handles
  retention for tsdb); reject_old_samples_max_age aligned to the 24h
  retention -- accepting week-old samples that get deleted immediately
  made no sense.
- dashboard: 5xx stat max cap removed (incidents above 1% looked
  pinned at the gauge edge); log panel filters container_name, the
  label Alloy actually sets, instead of the Loki-synthesized
  service_name.
- SLO.md: formulas synced to the shipped rules (error budget is the
  consumed failure fraction, 1 - ratio), metric name corrected from
  http_request_duration_seconds to http_request_latency_seconds --
  copy-pasted queries now return data; grafana.ini comment matched to
  its value.

Validated: promtool check config + rules (14 rules), loki
-verify-config, dashboard JSON parses.
vovinacci added a commit that referenced this pull request Jul 13, 2026
The subject-case rule read 'fix(observability): SLO coherence ...' as
sentence-case and failed the PR title gate (#147). Subjects here start
with acronyms routinely (SLO, API, CI, ADR); the rule is disabled --
type, scope, and the remaining conventional-commit structure stay
enforced. Verified: the rejected title passes, garbage still fails.
@vovinacci
vovinacci merged commit 0bbb031 into main Jul 13, 2026
3 checks passed
@vovinacci
vovinacci deleted the fix/slo-coherence branch July 13, 2026 06:50
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