# Error Rate

Error rate measures the proportion of eligible operations that fail a defined success condition during a reporting window.

- Type: metric
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-10-19
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/error-rate/>)

## What it means

For a defined operation population, error rate equals failed operations divided by all eligible operations, commonly expressed as a percentage. Define failure in terms of the service contract or user outcome, not only an HTTP status. Errors per second are a frequency measure and need traffic context; they are not the same as a failure proportion.

## Why it matters

An error count can rise simply because traffic grows. A proportion helps compare reliability over time while segmented counts show how many users or critical tasks were affected.

## When to use it

Use it for measurable requests, jobs, or transactions with a clear success rule. Keep infrastructure attempts and user-level outcomes distinct when retries occur. At low volume, report the numerator and denominator rather than relying on an apparently precise percentage.

## How it works

1. Define eligible operations and the success and failure rules.
2. Instrument both total operations and failures at the same boundary.
3. Compute failures divided by total operations over a stated window.
4. Segment critical paths, failure classes, and customers without hiding overall volume.
5. Investigate changes alongside latency, traffic, and reliability objectives.

## A practical example

A service records 30 failed requests out of 10,000 eligible requests, an error rate of 0.3%. Retry analysis shows some customers still complete their task, while others fail repeatedly. The team reports task failures separately to identify actual customer impact.

## Where it breaks

Instrumentation gaps and ambiguous success rules distort the metric. Business failures may arrive with HTTP 200, while expected rejected input is not necessarily a reliability defect. Zero eligible events provide no measured failure proportion, not proof of perfect service.

## Common mistakes

- Counting only server-status errors when business operations can fail silently.
- Changing the denominator between reporting periods.
- Treating zero traffic as a 0% error-rate success.

## Sources

1. [Monitoring Distributed Systems](<https://sre.google/sre-book/monitoring-distributed-systems/>) — Google SRE · Engineering handbook
2. [Instrumentation](<https://prometheus.io/docs/practices/instrumentation/>) — Prometheus · Official documentation

## Related topics

- [HTTP Status Code](<https://wiki.soroush.uk/topic/http-status-code/>)
- [Service-Level Indicator](<https://wiki.soroush.uk/topic/service-level-indicator/>)
- [Alerting](<https://wiki.soroush.uk/topic/alerting/>)
