Observability

Your agent’s logs are one big stream of plain-text lines.

Correlating a single run across services is painful.

  1. AEmit structured logs carrying a shared trace/run id on every line.
  2. BPrint longer, more descriptive log messages.
  3. CKeep the plain-text lines but add timestamps.
  4. DKeep plain text but write each service to its own larger log file, so one service’s lines never get mixed with another’s.

Answer: A

Emit structured logs carrying a shared trace/run id on every line.

Why

A shared trace id on structured log lines lets you filter one run across every service. Longer prose, timestamps, or bigger files alone don’t make runs machine-correlatable.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path