How do you monitor and observe a REST API in production, and what role do correlation IDs and tracing play?

Last updated 29 June 2026

  • Use the three pillars: metrics (RED: Rate, Errors, Duration as p95/p99 latency), structured JSON logs, and traces.

  • A correlation ID (e.g. X-Request-ID) is assigned per request, attached to every log line, and propagated downstream so one ID ties logs across services.

  • Distributed tracing (OpenTelemetry, Jaeger/Zipkin) splits a request into timed spans to show where latency goes. Health endpoints and SLOs drive alerts on user impact.

  • https://opentelemetry.io/docs/concepts/observability-primer/
  • https://opentelemetry.io/docs/concepts/context-propagation/
  • https://www.restguide.info/rest-api-monitoring
  • https://openobserve.ai/blog/logs-traces-metrics-correlation/
  • https://medium.com/engineering-excellence/correlation-ids-the-unrewarded-heroes-of-distributed-system-observability-40f564a0d7c7
  • https://medium.com/web-tech-journals/implementing-correlation-ids-in-microservices-architecture-78950597fc15
  • https://dev.to/leandronoijo/net8-web-api-monitoring-fast-and-easy-with-traces-logs-and-metrics-2o9n
  • https://novaaiops.com/observability
All REST API interview questions