API Error Budget Analyzer
Measure API error-budget burn from status counts or access logs, project the compliance window, and spot policy-breaking failure rates.| Metric | Value | Operational meaning | Copy |
|---|---|---|---|
| {{ row.metric }} | {{ row.value }} | {{ row.note }} |
| Status | Class | Requests | Share | Budget role | Copy |
|---|---|---|---|---|---|
| {{ row.status }} | {{ row.classLabel }} | {{ formatInteger(row.count) }} | {{ formatPercent(row.share_percent, percentDigits) }} | {{ row.consumes_budget ? 'Consumes budget' : 'Allowed' }} |
| Guardrail | Reference | Current | Action | Copy |
|---|---|---|---|---|
| {{ row.guardrail }} | {{ row.reference }} | {{ row.current }} | {{ row.action }} |
{{ chartLoading ? 'Loading chart…' : chartError }}
A service can return thousands of successful responses and still be on course to miss its reliability target. The deciding question is not how many requests failed in isolation, but how the failed share compares with the failure allowance promised by the service level objective (SLO).
An availability SLO sets a successful-request target over a compliance period. A target of 99.9% leaves an error budget of 0.1% of eligible requests. That budget gives teams room for ordinary failure while making sustained unreliability visible. At one million eligible requests, 0.1% allows 1,000 budget-consuming responses; at ten thousand requests, it allows only ten.
- Eligible request
- A request included in the service level indicator (SLI), the measurement used to judge the SLO.
- Budget-consuming response
- A response that the service policy counts as unsuccessful.
- Burn rate
- The observed failure ratio divided by the sustainable failure ratio. A value of 1 means the budget is being spent at exactly the rate the full period permits.
HTTP status does not decide SLO eligibility by itself. Server failures in the 5xx class are common budget consumers, but teams may also count 429 responses, selected client errors, or edge-specific codes when those outcomes represent a failed user experience. The same traffic sample can therefore produce different burn rates under different policies.
Short observations are useful for incident triage, yet they are noisy. Low traffic, a deployment burst, retries, bots, maintenance, or a changed status policy can distort a projection. A burn-rate estimate should be compared with the production SLI over a representative window before it drives an alert or release decision.
How to Use This Tool:
Use one traffic slice whose request counts, duration, and status policy describe the same API or SLO.
- Enter the API name, availability SLO, compliance period, and elapsed hours covered by the sample.
- Define budget-consuming statuses with classes such as
5xx, exact codes such as429, or inclusive ranges such as500-599. - Paste aggregated status counts or access-log lines. If parsing fails, use one status per line or a status-and-count pair such as
503=18. - Check Observed error rate, Burn rate, and Projected budget used together. Confirm that the status evidence matches the intended policy before acting on the projection.
Interpreting Results:
A burn rate below 1 means the observed failure share is below the sustainable share for the SLO. A burn rate of 1 is exactly on pace, while a value above 1 would exhaust the budget if the same failure ratio continued through a comparable compliance period.
- Healthy means projected budget use is below 70%.
- Watch begins at 70% and remains below 100%.
- Spent begins at 100%, including exactly 100%.
These labels summarize a straight-line projection, not a forecast of future traffic. Recheck the source window, request eligibility, and status policy against the monitoring system before treating a short sample as an SLO breach.
Technical Details:
Request-based error budgets compare the observed bad-event fraction with the fraction permitted by the SLO. The calculation aggregates every parsed status, applies the chosen status policy, and keeps full numeric precision until display formatting.
Formula Core
The permitted failure ratio is the distance from the SLO to 100%.
Burn rate compares the observed budget-consuming request ratio with that allowance.
| Symbol | Meaning | Unit |
|---|---|---|
| S | Availability SLO expressed as a ratio, so 99.9% becomes 0.999 | ratio |
| E | Sustainable failure ratio | ratio |
| F | Requests whose status matches the budget-consuming policy | requests |
| N | Total parsed requests | requests |
| B | Burn rate | ratio |
Projected budget use is B × 100%. Request and failure volumes are scaled by 24 divided by the observed hours and then by the compliance days. That scaling changes projected event counts, but the projected percentage remains the burn rate expressed as a percentage because both volumes use the same factor.
Rule Core
Status input accepts aggregated pairs, named status fields, or ordinary access-log rows. Repeated codes are added together. A class token such as 5xx matches the full class, an exact code matches only that code, and a range includes both endpoints.
| Quantity | Rule |
|---|---|
| Allowed bad requests in sample | N × E; this may be fractional because it is an allowance, not an observed count. |
| Sample budget delta | Allowed bad requests minus observed budget-consuming requests; a negative value means the sample overspent its proportional allowance. |
| Projected remaining events | Projected budget events minus projected bad events; negative values represent projected overspend. |
| Runway | The compliance days divided by burn rate, capped at the compliance period. Zero burn keeps the full period. |
The SLO must be greater than 0% and less than 100%. Compliance periods accept 1 to 366 whole days, observed windows accept 0.25 to 8,760 hours, and uploaded or pasted sources are limited to 2 MiB.
Accuracy and Privacy Notes:
The projection assumes the sample's traffic rate and failure ratio continue unchanged. It does not account for seasonality, traffic growth, maintenance exclusions, retries, latency objectives, or a monitoring system's eligibility filters.
- Status text and local files are processed in the browser and are not uploaded by this analysis.
- Access logs may contain client addresses, paths, and tokens. Use the narrowest safe slice and remove secrets before sharing exported evidence.
- Burn-rate alert policies often use several windows and thresholds. The 70% and 100% labels here describe this projection only.
References:
- Alerting on your burn rate, Google Cloud Observability, updated July 17, 2026.
- Alerting on SLOs, Google SRE Workbook, 2018.
- RFC 9110: HTTP Semantics, IETF, June 2022.