Skip to content
RED SAGSkills
easyBackend Developer interview question

What are logs, metrics and traces, and how would you use each one to run a backend service?

What the interviewer wants to hear

  • Logs are detailed records of individual events, best when structured
  • Metrics are numeric time series used for dashboards and alerts
  • Traces follow one request across services with timed spans
  • Correlate them with a shared trace or request id
  • Alert on symptoms users feel, such as error rate and latency

Model answer

They are the three main signals of observability. Logs are records of single events, like "payment failed for order 9". I write them as structured JSON with fields such as level, user id and request id, so I can search and filter them. Metrics are numbers over time, such as request rate, error rate, latency percentiles and queue depth. They are cheap to store and are what I build dashboards and alerts on, for example alerting when p99 latency or the 5xx rate goes above a threshold. Traces follow one request through every service, showing how long each step took, so I can see that a slow request spent most of its time in one database query. I use OpenTelemetry to produce traces and put the trace id in every log line. Then an alert leads me to a trace, and the trace leads me to the exact logs.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Backend Developer questions