Should you log every HTTP request at the ingress controller?

BeginnerScenarioLogging Pipelines
Answer

Situation read → Access logs are valuable for security and debugging but can be the largest log source.

What I'd do →

  1. Enable structured (JSON) access logs at ingress with key fields: status, latency, upstream, bytes, client IP, request ID.
  2. Keep all 4xx/5xx and slow requests; sample successful 2xx (e.g. 10%) if volume is a concern.
  3. Derive request metrics from Prometheus (ingress exports them) instead of computing them from logs.
  4. Set shorter retention for access logs than for app errors.

Why → Metrics give the rate; logs give the evidence for specific failing requests.

Interview tip → Mention security needs: sometimes full access logs are required for forensics.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines