Structured over text

JSON or logfmt. Fields: timestamp, level, message, trace_id, user_id. Aggregators parse + index.

Advertisement

Correlation IDs

Include trace_id from OpenTelemetry. Enables jump from log to trace to metric. Cross-tool navigation.

Advertisement

Levels

DEBUG (dev). INFO (state changes). WARN (recoverable). ERROR (needs investigation). Follow consistently.