Section 3 · Establishing a baseline

The workflow for turning observed metrics into automated pass/fail criteria

Estimated time: 1 min

Choosing threshold values

Start with your observed values and add headroom for normal variation:

MetricObservedThresholdHeadroom
p95 latency320 msp(95)<500~55% above observed
Error rate0%rate<0.01Allows up to 1%
Check pass rate100%rate>0.99Allows up to 1% failure

Trade-offs in threshold decisions

Threshold-setting involves judgment, not just formulas. Consider these trade-offs for your system:

DecisionTighter thresholdLooser threshold
HeadroomCatches small regressions earlyAvoids false failures from normal variation
p95 vs p99p95 reflects most users’ experiencep99 catches tail latency affecting your slowest users
Error tolerancerate<0.001 is strict, good for payment flowsrate<0.01 is practical for non-critical endpoints

A common starting approach: use p95 with 30-50% headroom for general APIs. Switch to p99 with tighter headroom for latency-sensitive paths like checkout or authentication.