Interview Prep/SRE & Reliability/Observability & Telemetry Decisions

A team wants to add debug logging to every request in production to troubleshoot an intermittent bug.

BeginnerScenarioObservability & Telemetry Decisions
Answer

Situation read → Debug logs for all traffic multiply log cost and can hurt performance; usually you only need them for a slice.

What I'd do →

  1. Enable debug dynamically for a subset: a header, a feature flag, or one canary pod.
  2. Use trace sampling with full attributes on errors instead.
  3. Set a time limit and an owner for the change.
  4. Make sure no secrets or PII appear in debug logs.

Why → Targeted debug data solves the bug without a cost spike or new risk.

Interview tip → Mention runtime log-level switching without redeploying.

All SRE & Reliability questions

More on Observability & Telemetry Decisions