Test Alert Rules and SLO Burn Rates With Injected Failures
Alert rules and SLO burn-rate alerts are usually written against traffic that never misbehaves, then trusted during an incident. The only way to know a rule works is to make the failure it describes actually happen — repeatably, and without touching production. This guide uses OTel Studio to do that.
1. Establish a quiet baseline
Add your collector or backend on the Endpoints page, enable one scenario (E-Commerce is a good default) at its normal error rate (5%), and press Start. Let it run long enough for your alert's evaluation window to fill — for a five-minute window, at least five minutes. Confirm the alert is not firing. A rule that fires on healthy traffic is a bug too.
2. Know which metrics to alert on
OTel Studio records request and error counters and a latency histogram for every scenario: http.requests.total, http.errors.total and http.request.duration (see the telemetry reference). A Prometheus-style backend typically exposes them with underscores and a _total suffix, so an error ratio looks like this:
sum(rate(http_errors_total[5m])) / sum(rate(http_requests_total[5m]))
Traces carry an error status on failed requests, so trace-based alerts (for example "error spans per service") work too. Because everything is marked synth.generated, you can scope the rule to test data while you develop it.
3. Cause the failure you are testing for
Different alerts need different failures. Pick the matching tool:
| You are testing… | Use | What happens |
|---|---|---|
| A sudden spike in errors or traffic | Inject Anomaly | For 30 seconds traffic is ten times normal and 80% of requests fail; some spans take two to eight seconds. |
| A sustained error rate (SLO burn) | Error Storm scenario, or raise a scenario’s Err% slider | A constant 80% failure rate — long enough to cross multi-window burn-rate thresholds. |
| Latency percentiles or timeouts | Latency Spike scenario | 30% of spans take 2–8 seconds, so p95 and p99 move while the error rate stays low. |
| A dependency taking others down | Cascading Failure scenario | 75% errors with circuit-breaker fallbacks. |
| One bad host or node | Inject Incident (needs Infrastructure on) | One host degrades for 60 seconds and the services on it fail with matching symptoms. |
| Ingestion pressure | Traffic Surge scenario or the speed multiplier | Ten times the volume, or up to 10× on every scenario. |
4. Walk through the alert lifecycle
- Fires: start the failure and note how long the alert takes to go from pending to firing. Compare with what you expect from the rule's
forduration and evaluation interval. - Notifies: check the notification arrives in the right channel with the right labels and a useful link back to the data.
- Resolves: stop the failure (Stop Anomaly, or switch the scenario back) and confirm the alert clears — and that it doesn't flap.
- Stays quiet when it should: a short anomaly should not trip a rule designed for sustained burn. This is the useful negative test.
5. Testing burn-rate alerts
For an availability SLO of 99.9% over 30 days the error budget is 0.1%. A multi-window burn-rate alert (for example "14.4× over 1 hour and over 5 minutes") needs errors that last. The 30-second anomaly is too short for that, so use Error Storm or set a high Err% on a scenario, set a time limit, and let it run through the longer window. Then stop it and verify the short window clears first.
A checklist
- Quiet on healthy traffic for a full evaluation window.
- Fires within the expected time on each failure type you care about.
- The notification arrives with the right labels and links.
- Resolves cleanly and does not flap.
- Stays quiet on a failure that is too short to matter.