Maintenance

Instrument External API Latency and Failure Rates

Measure dependency performance and distinguish provider failures from application-side problems.

External APIs add uncertainty to request duration and service reliability. Instrument each dependency so teams can identify which provider or operation is responsible for slowdowns.

Record dependency metrics

Track request count, latency percentiles, timeout rate, HTTP status classes, retry count, and circuit-breaker state. Use bounded labels such as provider and operation rather than full URLs or customer identifiers.

Separate failure categories

Distinguish connection failures, timeouts, provider-side server errors, rate limiting, authentication failures, and application validation errors. Each category requires a different response.

Correlate traces

Attach trace context to outbound requests where supported. Record the dependency span without storing credentials or sensitive payloads.

Compare provider behavior with user impact

A provider can be degraded while the application remains healthy due to caching or fallback. Conversely, a modest provider slowdown may cause major user impact if calls are synchronous and repeated.

Checklist

  • Measure latency, errors, timeouts, and retries.
  • Classify failures by cause.
  • Use low-cardinality metric labels.
  • Correlate outbound calls with traces.
  • Relate dependency health to user outcomes.
Share this page Help other developers discover this resource.