Error rate
The share of operations that failed in a time window: 20 failures out of 10,000 requests is a 0.2 percent error rate.
See it
What it is
Error rate is failed operations divided by all operations in the same time window. If 20 of 10,000 requests fail in five minutes, the error rate is 0.2 percent. The hard part is not the arithmetic, it is deciding what counts as failure: an HTTP 500 usually does, a user-caused 404 usually does not, and a response marked 200 with a failed payment inside it may still be a business error.
Reach for it when raw error counts cannot be compared across changing traffic. Error rate is the E in the RED method (rate, errors, duration), coined by Tom Wilkie, and a common service level indicator, because it says what share of attempts users lost. Break it down by operation, route, status class, or dependency to find where the failures concentrate.
Gotcha: percentages become theatrical at low volume. One failure out of three requests is 33 percent, so alerts need a minimum request count or a longer window. Retries can also distort both sides of the fraction: counting attempts measures system load, while counting final outcomes measures what users experienced. Name which one you mean.
Ask AI for it
Instrument a single http_requests_total Prometheus counter, with bounded labels for route, method, and status class. Add a five-minute PromQL recording rule using sum(rate(http_requests_total{status_class="5xx"}[5m])) divided by sum(rate(http_requests_total[5m])). Chart the ratio as a percentage, split it by route, and alert only when it exceeds 2 percent and at least 20 requests occurred in the window. Document whether retries count as attempts or final user outcomes.