Search GimmeJob

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

How would you approach structured logs across a distributed request path?

Answer

Start by tracing a user-visible symptom through telemetry to the responsible change and dependency. Focus on structured logs across a distributed request path. 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 request touches the API gateway, cart service, payment service, and inventory service, each writing its own logs. The tester adds a shared request ID that every service includes in its structured log lines and writes a test that fires one request, then confirms all four services' logs can be joined on that ID before deciding logging is 'done' for the flow.

#observability#production#sre#structured-logs

Sources

OpenTelemetry conceptsOpenTelemetry · Traces, metrics, logs, context propagation and instrumentationPrometheus alerting practicesPrometheus · Symptom-based actionable alerts, metamonitoring and noise reductionConfigure liveness, readiness and startup probesKubernetes · Service health, traffic readiness, recovery and probe failure modes