Resource · Guide or article
Logs vs Metrics vs Traces
Compares metrics (cheap health data for alerting), logs (detail on discrete events) and traces (a request's path across services). A compact refresher before observability questions in system design rounds.
Reviewed
Open the original: Logs vs Metrics vs Traces (opens the original site in a new tab)Practice this topicOpens the practice interviewer in System design mode; choose a question there.
Add to a roadmap
Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.
Source content: English
The purpose of metrics is to inform observers about the health & operations regarding a component or system. A metric represents a point in time measurement of a particular source, and data-wise it tends to be very small. The compact size allows for efficient collection even at scale in large systems. Metrics also lend themselves very well to pre-aggregation within the component before collection, reducing computation cost for processing & storing large numbers of metric…
PrepKit overview
PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.
- Suited to
- The source does not state a level
- Format
- Article
What it covers
- Why metrics suit alerting at scale: small, pre-aggregated, efficient to store
- Why logs are used after metrics point to a problem, and the cost of verbose logging
- Traces as collections of spans, where a span can be an HTTP call, a database query or a queue message, plus three rules for choosing a signal
How to use it
PrepKit study advice, not a claim made by the source.
For a feature you built, name one metric, one log line and one trace span and the question each answers. Be able to say why you would alert on the metric rather than the log.
Scope and limitations
A short team page, not interview material, with no tooling or code; the comparison image is not described in text.
Access and format
Free to read online in English; part of Microsoft's Code-With Engineering Playbook, licensed CC BY 4.0.
Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 016770e43d8a
Evidence behind this overview
- docs/observability/log-vs-metric-vs-trace.md
Pages that include this
Get the PrepKit newsletter
Optional. You don't need it to use PrepKit.