Trace vs Log Per Event: A Decision Tree
Some events belong in logs; some in traces. The decision tree that picks the right place per event class.
Trace if
It is part of a request flow. Spans are units of work within a trace.
It needs context propagation. Traces carry context naturally.
Log if
It is async or batch. Logs are independent of request context.
It contains high-cardinality info. Traces have attribute budgets; logs do not.
Both if
High-stakes events deserve both. Trace for in-flow context; log for searchability.
Cost of both is small for important events; the redundancy is worth it.