Cheat sheet
Production traces
From lesson 0018. One id through HTTP, the agent, the tools, and the world.
- CorrelateSame id on the request, spans, and mutations.
- SpanUnit of work with a parent. Nest the loop.
- ReadOpen the tree. Grade the world, not the chat.
Not
- Not three log files with three ids. That is not a path.
- Not a vendor APM. OpenTelemetry is the interchange.
- Not an eval suite — that samples these trees next. Eval suites. Floor: evals.
- Not default full-prompt capture in prod. Opt-in debug.
Who mints
- The SDK at the first hop with no
traceparent— not the LLM. - Context lives in RAM for the request; spans go to your backend; Stripe/SQL only if you copy the id.
- The agent inherits the bag only if your harness keeps it (in-process or inject on HTTP).
OTel: a trace is the path of a request. Anthropic: outcome ≠ last sentence. Put request_id on Stripe and SQL.