HomeRoadmapsObservability Day 6
Observability-Driven QE Track Β· Day 6 Β· 20 min

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.

⚑ Runtime: Node.js 22 LTS Β· VitestπŸ›‘οΈ Observability & Distributed Systems QE Architect
SLI / SLOError BudgetsBurn RateSynthetic ProbesProduction Monitoring
About this lab

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.

πŸ“¦Sample Codebase & Working Solution (Day 6)Available Now
View on GitHub

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 β€” Working Solution
git clone https://github.com/777abhi/observability-qe-roadmap.git
cd observability-qe-roadmap/tests/day6-slo-error-budgets.spec.ts
🏭Production Context & Enterprise Implementation
πŸ’‘ Why We Are Doing This: Teams need an objective measure for when to halt feature releases and prioritize stability. A 5x burn rate means the entire monthly error budget will be consumed in 6 days.
🏒 Real-World Production Usecase: Replaying simulated synthetic customer purchases every 60 seconds and computing real-time SLO compliance.
βš™οΈ How Implemented in Production: SyntheticProbeEngine simulating Gateway -> Order -> Payment hops and ErrorBudgetCalculator computing burn rates.
Phase 1

Calculate Error Budgets & Burn Rates

Run Day 6 Vitest suites and inspect SLO calculations.

Step 6.1: Run Day 6 Tests
Terminal β€” Run Day 6 Tests
npm run test:day6
Step 6.2: Sample Codebase & Working Solution (Day 6)
src/slo/errorBudgetCalculator.ts
export 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,
    };
  }
}
Day 6 Key Learnings
  • 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%?