Repository navigation
feat(observability): ship the dashboard, the alerts, and the SLOs - #30
Merged
Merged
Conversation
Roadmap Horizon 1 item 5. An operator got a /metrics endpoint, a template to scrape it with, and interpretation nowhere. Metric names are frozen by the v1 contract, which is exactly what makes publishing queries against them safe, so they are published. A Grafana dashboard of 16 panels across five rows — service level, latency, upstreams, governance, ingress — plus eight alert rules in three groups, both in the chart beside the existing servicemonitor, both opt-in, and both rendered by every ci/ value set so a broken template fails helm-check rather than a cluster. The availability SLO counts only the outcomes fold failed: error and upstream_down. Denied, rate_limited, and budget_exhausted are excluded on purpose. An SLO that counts correct refusals pages someone for tightening a policy, burns error budget when a customer hits the ceiling they were sold, and teaches a team to ignore the alert — while upstream_down is counted, because fold owns the federation's reachability even when the fault is an upstream's. For the same reason the latency threshold is a values knob rather than a constant: fold_request_duration_seconds includes the upstream's own time, so no universal number is honest. What fold promises about its own cost stays where it can be measured exactly, in the CI latency gate; the dashboard carries a live approximation and says in the panel description why quantile subtraction over-reads on list-heavy traffic. Nothing pages by default. Severities are warning and info, because the genuinely paging condition — no upstream reachable — is a 503 from /health that an existing probe already watches. A test keeps the pack and the code in lockstep both directions: every fold_* name a panel or rule references must be declared, and every metric declared must appear somewhere in the pack, so a new metric forces the question rather than shipping unshown. This guards the two failure modes an operator cannot see — a panel that draws nothing and an alert that can never fire both look exactly like healthy. Verified by mutation: renaming one referenced metric by a single character fails with the file and the name. Chart to 0.1.4. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roadmap Horizon 1 item 5. An operator got a
/metricsendpoint, a template to scrape it with, and interpretation nowhere. Metric names are frozen by the v1 contract — which is exactly what makes publishing queries against them safe — so they are published.What ships
deploy/helm/fold/dashboards/fold-overview.jsonmetrics.dashboard.enabled(ConfigMap for the Grafana sidecar) or import the JSONtemplates/prometheusrule.yamlmetrics.prometheusRule.enableddocs/operations.md#dashboards-alerts-and-slosRows: service level, latency, upstreams, governance (per-tenant consumption and refusals), ingress/config. Both templates render in every
ci/value set, so a broken one failshelm-checkrather than a cluster.The availability SLO counts only what fold failed
errorandupstream_down.denied,rate_limited, andbudget_exhaustedare excluded. An SLO that counts correct refusals pages someone for tightening a policy, burns error budget when a customer hits the ceiling they were sold, and teaches the team to ignore the alert.upstream_downis counted — fold owns the federation's reachability even when the fault is an upstream's.Same reasoning makes the latency threshold a values knob, not a constant:
fold_request_duration_secondsincludes the upstream's own time, so no universal number is honest. What fold promises about its own cost stays in the CI latency gate where it can be measured exactly; the dashboard carries a live approximation whose panel description says plainly why quantile subtraction over-reads on list-heavy traffic.Nothing pages by default — severities are
warningandinfo. The genuinely paging condition, "no upstream reachable", is a 503 from/healththat an existing probe already watches.Lockstep test
gateway/observability_pack_test.gochecks the pack against the code both directions: everyfold_*name a panel or rule references must be declared, and every metric declared must appear somewhere in the pack (so a new metric forces the question instead of shipping unshown).This guards the two failure modes an operator cannot see — a panel that draws nothing and an alert that can never fire both look exactly like "healthy". Verified by mutation:
make checkgreen,make helm-checkgreen. Chart to 0.1.4.🤖 Generated with Claude Code