feat: Custom SLO for User Experience SLIs
Description
Adds an optional slo object to User Experience SLI definitions, so SLI owners can set custom Apdex and error SLOs per User Experience SLI:
slo:
apdex_pct: 99.9
error_pct: 0.1slo.apdex_pctis the minimum percentage of experiences that must complete within the Apdex threshold.slo.error_pctis the maximum percentage of experiences that may end in an error.
Both keys are optional, and so is slo itself. Values must be greater than 0 and less than 100, and no other keys are allowed inside slo. Values are percentages so registry definitions are easy for SLI owners to read.
In Ruby, Labkit::UserExperienceSli::Definition gets a new slo: attribute (defaults to nil) holding a Labkit::UserExperienceSli::Slo with apdex_pct and error_pct (both default to nil). Existing keyword callers keep working.
LabKit only validates and preserves these values. It does not use them when recording metrics, and it does not apply defaults: SLOs are a monitoring/alerting concern, and consumers fall back to their own defaults (currently 99.95 / 0.05) when a value is omitted.
Downstream
- gitlab-com/runbooks!10808: reads
slo.*and generates per-SLI apdex and error SLO rules, recording rules and dashboards. - gitlab-org/error-budget-reports!40: adjusts how over/within budget is decided (see this thread for why the combined ratio can't be compared with a single SLO).