- Part 1: Logging the answer tells you almost nothing
- Part 2: Your AI feature has unit economics whether you measured them or not
- Part 3: Real users ask questions your test set never imagined
- Part 4: You cannot roll back a prompt you never versioned
- Part 5: Nothing broke, and the system is still getting worse
A customer tells you the assistant quoted the wrong renewal figure last Tuesday. You open your logs and find the answer text, a timestamp and a user ID. Nothing about which documents were retrieved, which prompt version was live, or whether the pricing tool timed out and the model filled the gap from memory.
With only that to go on, you cannot debug it, so you apologise and guess.
AI features that began as a chat prototype get logged like chat apps, with one row per exchange, the final answer stored and everything that produced it discarded. That works until someone asks why an answer was wrong.
Trace each step as a span
The unit of AI observability is the span. One user request opens a root trace, and every step underneath gets its own span: the retrieval call, each model call, each tool invocation, the guardrail check, the final render. Propagate the trace into every service the request crosses with the W3C Trace Context traceparent header, or a tool's spans land in a separate trace.
Each span carries what it needs to be reconstructed later: start and end time, status, the prompt template version, the model version actually served rather than the one written in config, and tokens in and out. A retrieval span records the document IDs and scores returned rather than the passages. A tool span records the arguments (redacted or hashed), the response code and the retry count.
The trace ID then has to escape the system. Put it in the response payload, on the support ticket, on the eval failure record. A complaint that arrives with a trace ID attached is a ten minute investigation. Without one it is a day of guesswork, and the guess is almost always "the model hallucinated" because that explanation is free to reach for. Often it was a tool returning an empty array.
Metrics you keep, content you do not
Four metric families answer most operating questions: tokens per successful task, p95 latency split by span type, error rate by component, and retry count. Retries are the one teams skip and the one that quietly explains both the latency curve and the invoice.
Content logging is where people get hurt. Prompts contain whatever the user typed, retrieved chunks contain whatever is in the corpus, and both land in a store with a long retention policy and broad read access. Decide the redaction boundary while you are designing the span model, before legal asks. A sane default keeps structured metadata everywhere, raw content only in a short-retention store behind separate access, and a documented list of fields that are never written at all.
Then give support a timeline view over it, a rendered sequence of spans with versions and timings, rather than log search. When support can say "retrieval returned nothing for this query", the ticket closes. When all they can say is "the AI is broken", it stays open for a week.
Test it on a real complaint
Take one complaint from last week and answer it from telemetry alone, finding which documents came back, which prompt and model versions served it and what each tool returned. Each question you cannot answer is a missing span attribute. If the trace was sampled away, switch to tail-based sampling and keep every trace that errored, retried or ran slow, at the price of most ordinary requests keeping only their metrics.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Sep 14, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Deep dive · · 7 min read
Every question your AI readiness review asks was answered months ago
The last six days of a sixty-day series, and the pattern is that operability gets bought early or it does not get bought at all.
Explainer · · 2 min read
A wrong answer tells you nothing about which agent was wrong
Multi-agent systems need trace timelines, trajectory evals and designed recovery, because the final output hides everything that produced it.
Explainer · · 2 min read
If you cannot trace it, you cannot run it
Production AI needs traces across prompts, context, retrieval, tools, costs and decisions to debug anything at all.
Discussion