Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Observability & productionSeniorOccasionalTest design

How would you design a focused test strategy for structured logs when failures are intermittent?

Answer

Build the smallest useful model of the behavior by tracing a user-visible symptom through telemetry to the responsible change and dependency. Focus on structured logs when failures are intermittent. Use service-level objectives, known test events and correlated logs, metrics and traces as the oracle. Cover signal correctness, context propagation, sampling, alert routing, rollout and recovery. Keep data and dependencies controlled enough to reproduce failures. Release only when a responder can detect, scope and diagnose the failure within the agreed operational target.

Strong answer includes

  • explicit risk and test oracle for structured logs
  • tests telemetry as product behavior
  • prefers actionable symptom-based alerts
  • measurable evidence and residual-risk statement

Practical example

A checkout error happens roughly once every 200 requests with no obvious pattern. Instead of trying to reproduce it locally, the tester designs a minimal check that runs continuously in a low-traffic staging loop, samples 100% of logs (not the usual 1%) for that one flow, and correlates failed requests by user segment, finding the failures cluster on accounts with an unusually large cart.

#observability#production#sre#structured-logs

Sources

OpenTelemetry conceptsOpenTelemetry · Traces, metrics, logs, context propagation and instrumentationPrometheus alerting practicesPrometheus · Symptom-based actionable alerts, metamonitoring and noise reduction