← All posts
Observability: From Logs to Traces
Logs told us what happened. Traces told us where the time went. The difference was a 3am incident solved in ten minutes.
For years we debugged with logs and intuition. It worked until a request touched eight services and the slow one wasn't the obvious one.
Spans over lines
A trace ties one request's journey across services into a single timeline. Suddenly "the API is slow" becomes "the auth service adds 400ms on cache miss."
const span = tracer.startSpan("db.query");
try {
return await pool.query(sql);
} finally {
span.end();
}Logs answer "what happened." Traces answer "where did the time go." You need both, but the second one ends incidents faster.
More to read