Alerting

Test Alert Rules and SLO Burn Rates With Injected Failures

Make the failure happen, then check the alert — repeatably, and without touching production.

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…UseWhat happens
A sudden spike in errors or trafficInject AnomalyFor 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% sliderA constant 80% failure rate — long enough to cross multi-window burn-rate thresholds.
Latency percentiles or timeoutsLatency Spike scenario30% of spans take 2–8 seconds, so p95 and p99 move while the error rate stays low.
A dependency taking others downCascading Failure scenario75% errors with circuit-breaker fallbacks.
One bad host or nodeInject Incident (needs Infrastructure on)One host degrades for 60 seconds and the services on it fail with matching symptoms.
Ingestion pressureTraffic Surge scenario or the speed multiplierTen times the volume, or up to 10× on every scenario.

4. Walk through the alert lifecycle

  1. 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 for duration and evaluation interval.
  2. Notifies: check the notification arrives in the right channel with the right labels and a useful link back to the data.
  3. Resolves: stop the failure (Stop Anomaly, or switch the scenario back) and confirm the alert clears — and that it doesn't flap.
  4. 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.

Make it repeatable. Export your setup (Endpoints page → Config Import / Export) so the same scenario mix and rates can be loaded again, or run it headless from CI — see Run OTel Studio in CI. Set a time limit with a webhook to be told when an unattended run ends.

A checklist

Keep going