Site Reliability Engineer interview question
How do metrics, logs, and traces work together?
Metrics reveal trends and alert conditions, traces connect latency across a request, and logs explain discrete events. Correlation IDs and consistent service metadata let engineers move among them without duplicating every signal.
Direct answer
What a strong answer covers
How it works
Each signal answers a different question. Metrics are cheap aggregates over time that show trends and drive alerts: request rate, error ratio, latency percentiles, saturation. Traces follow one request across services and show where its time went, which metrics cannot. Logs record discrete events with detail, such as which order failed validation and why. They work together only when they share identifiers: a trace ID in every log line, service and version labels on every metric and span, and dashboards that link from a latency spike to example traces and from a trace to its logs. Without correlation, engineers re-derive context by hand during every incident.
Example
An alert on checkout p99 links to a dashboard where the latency panel shows exemplar traces; clicking one shows a 2-second span in the tax service, and the span’s trace ID filters logs to the single request, which reveal a retry loop against a rate-limited endpoint. The whole path from page to cause took four minutes because the three signals shared the trace ID and the deployment version.
Common mistakes
- Logging everything at debug level and using logs as metrics.
- Sampling traces so aggressively that the failing request is never captured.
- Emitting metrics and logs without a shared identifier so they cannot be joined.
A useful answer structure
Answer from your own work.
Do not memorise a script: use only examples you can explain honestly in follow-up questions.
Open the desktop workspace and rehearse a clear answer in your own words.