Skip to slide
180 / 221

CH 15 · Observability and Evaluation · 05/08

Read as one page

Logging discipline

Even with a fancy platform, basic logging hygiene matters:

  • Structured, not free-text. Log key-value fields (turn id, tool, document id, duration) so logs are queryable.
  • Context on every error. A failure log should say which turn, which tool, which resource, and the error: enough to diagnose without reproducing.
  • Never log secrets (Chapter 12) or sensitive document content; scrub them.
  • Log decisions, not just outcomes. "Routed to mid-tier model because user has only a Gemini key" is more useful than "called Gemini."

Finished this idea?

Your learning progress stays in this browser.