Logs vs metrics vs traces, and SLI vs SLO?
Understand the concept
Observability means understanding a system's behavior from the information it emits. Logs capture events, metrics summarize measurements over time, and traces connect work across a request path. An SLI is a measured service behavior, while an SLO is the target the team aims to meet over a defined period.
Important ideas
-
Logs describe events; metrics show numeric trends; traces connect request steps.
-
A request ID helps connect related logs without exposing private data.
-
SLI is a measurement, such as successful requests; SLO is its target over a time window.
-
For an availability SLO, specify what counts as a successful eligible request and which measurement window applies.
Work through the example
- SLI: proportion of eligible API requests that complete successfully.
- SLO: at least 99.9% of those requests succeed over a rolling 30-day window.
- Trace: one slow request spends 4.5 seconds waiting for a DB connection and 50ms executing SQL.
- That trace points toward pool contention or connection ownership, not immediately a slow SQL plan.
Can you explain it without the notes?
Logs vs metrics vs traces, and SLI vs SLO?
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Observability means understanding a system's behavior from the information it emits. Logs capture events, metrics summarize measurements over time, and traces connect work across a request path. An SLI is a measured service behavior, while an SLO is the target the team aims to meet over a defined period.
Turn this concept into a clear answer.
- Alert on meaningful user impact or exhausted error budget, not every transient resource fluctuation.
Adapted from 08_PERFORMANCE_SECURITY.md · “Logs vs metrics vs traces, and SLI vs SLO?”. Examples are study fragments; framework behavior can depend on your version.