SLO Error Budgets & Synthetic Probes
Observability-Driven QE Sprint β Day 6
Translate distributed trace telemetry into Service Level Indicators (SLIs), track error budget burn rate factors, and replay synthetic transactions across multi-tier topologies.
Modern site reliability engineering measures reliability in terms of error budgets. If your SLO target is 99.0%, you can afford a 1.0% failure rate. In this lab, you build an automated SLI/SLO accounting engine that calculates consumed budgets and burn rates from synthetic checkout probes.
The official reference codebase for Day 6 is hosted in the repository. Clone the repository and navigate to tests/day6-slo-error-budgets.spec.ts to run the working solution.
git clone https://github.com/777abhi/observability-qe-roadmap.git
cd observability-qe-roadmap/tests/day6-slo-error-budgets.spec.tsCalculate Error Budgets & Burn Rates
Run Day 6 Vitest suites and inspect SLO calculations.
npm run test:day6export class ErrorBudgetCalculator {
static evaluate(spans: TraceSpanRecord[], config: SloConfig): ErrorBudgetReport {
let goodEvents = 0;
let badEvents = 0;
for (const span of spans) {
if (span.statusCode === 'ERROR' || (config.maxLatencyMs && span.durationMs > config.maxLatencyMs)) {
badEvents++;
} else {
goodEvents++;
}
}
const actualSli = (goodEvents / spans.length) * 100;
const allowedErrorRate = (100 - config.targetPercent) / 100;
const actualErrorRate = badEvents / spans.length;
const burnRate = allowedErrorRate > 0 ? (actualErrorRate / allowedErrorRate) : 0;
return {
sloName: config.name,
targetPercent: config.targetPercent,
actualSliPercent: actualSli,
burnRate,
isCompliant: actualSli >= config.targetPercent,
};
}
}- Built synthetic probe transaction generators simulating 3-tier microservice checkout flows.
- Calculated objective SLI and SLO metrics directly from distributed span outcomes.
- Tracked error budget consumption and computed multi-window burn rate multipliers.
π§ Knowledge Check
What does a burn rate of 5.0x indicate for a service with an SLO target of 99.0%?