loading…
Capture enough context to explain behavior without leaking sensitive data.
A production trace should connect the user request to prompt and policy versions, retrieved sources, model calls, tool calls, state transitions, approvals, final outcome, latency, and cost. Correlation IDs let engineers reconstruct a distributed path across services.
| Signal | Questions it answers |
|---|---|
| Logs | What event occurred and with which safe metadata? |
| Traces | Which sequence of retrieval, model, policy, and tool steps occurred? |
| Metrics | How often, how long, how expensive, and how successful? |
| Feedback | Where did users correct, reject, escalate, or abandon? |
Do not log secrets or unrestricted full prompts by default. Apply redaction, access control, retention limits, tenant separation, and sampling. Store enough provenance to reproduce the decision while minimizing sensitive payloads.
Classify failures—retrieval miss, model refusal, schema error, authorization denial, tool timeout, unsafe output, user correction—rather than reporting one generic "AI error." A useful taxonomy turns traces into actionable engineering work and targeted evaluation cases.
Important production incidents should produce three artifacts: a corrected design or control, a new regression case, and an operational signal that would detect recurrence.