Repository navigation
feat(slos): latency ladder counters on the service overview rollups - #2294
Conversation
service_overview_hourly and service_overview_minutely gain EstimatedUnder<ms>Ms for each SLO_LATENCY_THRESHOLDS_MS rung (50ms to 10s): sumIf(SampleRate, Duration < ms), entry-point spans of any status. The view SELECTs are generated from the ladder constant, and sloLatencyColumnName maps a threshold to its column. Both views now deploy with DEPLOYMENT_METHOD alter so the column addition does not rebuild the year-long hourly table from 30 days of traces. Migration 0058 adds the columns (DEFAULT 0) and recreates both views; local schema v50 does the same and verifies the rollup row counts are unchanged. Existing buckets read the ladder as 0 and are not backfilled.
EstimatedLadderSpanCount (sum(SampleRate), DEFAULT 0) sits before the eight rungs on both service overview rollups. A bucket materialized before 0058 reads 0 for it, so a latency SLI over total = sum(EstimatedLadderSpanCount) and good = sum(EstimatedUnder<ms>Ms) counts only covered spans instead of scoring old buckets as all slow. SLO_LATENCY_COVERAGE_COLUMN names it. Folded into migration 0058 and local schema v50, neither of which has shipped. The retention-matrix gate now requires DEPLOYMENT_METHOD alter on both views.
main landed migration 0058 and local schema v50 first: the ladder is now migration 0059 and local schema v51, artifacts regenerated.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 32 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This comment has been minimized.
This comment has been minimized.
Maple review🟢 Confidence 10/10 · safe to merge. Column order, frozen DDL and generated schema all agree, and the ladder, its zero coverage on old buckets and the v50 to v51 edge are each pinned by a test. Adds nine sampling-weighted SLO latency ladder counters to both service overview rollups, in migration 0059, the Tinybird views (deployed by ALTER) and the v51 local schema, with tests for the view math, the zero coverage of pre-0059 buckets and the chDB edge. Safe to merge.
Before merge
|
|
Tinybird deploy verified on the #2298 preview branch, which carries this migration: deploy run, commit
|
|
Merged with 3 steps from "Before merge" still open. If they are done, tick them on the review comment; if not, now is the time.
|
Stack: #2293 model, #2294 latency ladder, #2295 compute, #2296 burn alerts, #2297 MCP, #2298 UI
Part 2 of 6. This PR lets latency SLOs read 30-day windows from the rollups instead of raw spans.
Why it's needed. The service rollups store only quantile summaries, plus an Apdex counter at a fixed 500 ms. That means "share of spans faster than X" could only be computed exactly at 500 ms.
What changed
service_overview_hourlyandservice_overview_minutely:EstimatedUnder{50,100,250,500,1000,2500,5000,10000}Ms, eachsumIf(SampleRate, Duration < ms)over any status;EstimatedLadderSpanCount.DEPLOYMENT_METHOD alter, the same fix migration 0023 needed. Without it, a rebuild would replay 30-daytracesinto the 90-day and 365-day rollups.retention-matrix.test.tsnow covers both views.Verification
clickhouse:schema:checkandtinybird:manifest:checkpass.🤖 Generated with Claude Code