Your agent’s logs are one big stream of plain-text lines.
Correlating a single run across services is painful.
- AEmit structured logs carrying a shared trace/run id on every line.
- BPrint longer, more descriptive log messages.
- CKeep the plain-text lines but add timestamps.
- 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.
- ObservabilityFull tracing of every run now costs more than the model calls it traces.
- ObservabilityYou log token spend per run in detail, yet nobody in the room can say whether the agent is worth keeping.
- ObservabilityA user reports the agent gave a wrong answer yesterday.
- ObservabilityYour monthly AI bill doubled and you have no idea which feature caused the jump.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path