All insights
Apr 26, 2026 · 6 min read

SLO burn rates without a vendor — in 400 lines of JS

How we built a multi-window error-budget engine that reads Prometheus, per the Google SRE workbook — without Datadog or Honeycomb.

The problem

Datadog SLOs start at $100+/month per surface. With 6 surfaces that is $7,200+/year before you see a single metric. The Google SRE workbook is free, Prometheus is already there, and the math is simple. We wrote it ourselves.

The YAML contract

Each SLO is a record in infra/slo/definitions.yaml: id, target_pct, window, sli_query (PromQL), public flag. One SLO is one weekly review item — do not multiply gratuitously.

Burn-rate math

A 99.9% target over 30 days means an allowed error ratio of 0.1%. If the observed error ratio in the last 1 hour is 1.4%, your burn rate is 1.4% ÷ 0.1% = 14×. At 14×, the budget runs out in 21 hours instead of 30 days. Page someone.

Google SRE recommends three windows: 14.4× over 1h (page), 6× over 6h (page), 1× over 24h (ticket). All three in one simple loop.

The footgun we caught

PromQL uses RE2 — no negative lookahead. Our first SLI for /api/* excluding /api/admin/ used (?!admin/) and failed with HTTP 400. Fix: switch to label exclusion, http_route!~"/api/admin/.*". Your burn calculator will catch this on the first run if it logs Prometheus errors instead of swallowing them.

The error-budget code (excerpt)

const sli30d = await promQuery(query.replace('[1m]', '[30d]'));
const allowedErr = 1 - target_pct/100;
const observedErr = 1 - sli30d;
const budgetRemaining = Math.max(0, 1 - observedErr/allowedErr) * 100;
for (const t of [{burn:14.4, w:'1h'}, {burn:6, w:'6h'}, {burn:1, w:'24h'}]) {
  const sli = await promQuery(query.replace('[1m]', `[${t.w}]`));
  if ((1 - sli) / allowedErr >= t.burn) alerts.push(t);
}

The cost

Zero license. About 4 hours to write the engine, 1 hour for the /api/slo endpoint, 1 hour to add the panel to the status page. Compare with Datadog: $7,200+/year and 6 hours of setup. The gap compounds annually.

Want SLOs without a vendor subscription?
We ship the engine, catalogue, and dashboard in 2-3 days for most platforms.
Get in touch