Tracing and observability for LLM features
For engineers
Recording every model call, tool call and retrieval step as spans with OpenTelemetry GenAI conventions, so a wrong, slow or costly answer can be traced to its cause
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
What is a span in an LLM trace?
Check yourself · 2 of 5
Which attribute holds the number of tokens the model read, in the OpenTelemetry GenAI conventions?
Check yourself · 3 of 5
A contract says customer text must stay in your own network. Which option fits best?
Check yourself · 4 of 5
A user reports a bad answer from yesterday. What lets you find that exact trace fastest?
Check yourself · 5 of 5
Where should redaction of personal data in traces happen?
Topics
- Spans for model, tool and retrieval calls5 min read · A trace is a tree of spans: one per model call, tool call, retrieval step and agent turn, each carrying inputs, outputs, token counts, latency and errors
- OpenTelemetry GenAI semantic conventions5 min read · The standard gen_ai.* attribute names for operation, provider, model, token usage and agent spans, opt-in capture of prompt content, and why standard names let you switch tracing backends
- Choosing an LLM tracing backend5 min read · Langfuse, Arize Phoenix, LangSmith, Braintrust and general APM tools such as Datadog or Honeycomb compared on open source, self-hosting, data residency, sampling and price
- Linking traces to sessions, versions and feedback5 min read · Tagging each trace with request id, session, user or tenant, prompt version, model snapshot and feedback score so you can filter the traces that matter
- Capturing prompt content without leaking data5 min read · Full prompts in traces help debugging but copy personal data and secrets into another system; redaction in the SDK, content-capture switches, sampling, retention and access control
- Debugging a bad answer from its trace6 min read · Starting from a user complaint, finding the trace by request id and walking its spans to locate the failing step: a retrieval miss, truncated context, a tool error or the wrong model version
Start here
- OpenTelemetry semantic conventions for generative AI (opens in a new tab)StandardFree
The standard gen_ai.* attribute names for model calls, agents, events and metrics.
- Semantic conventions for generative AI client spans (opens in a new tab)StandardFree
Span naming, required and recommended attributes, and which content fields are opt-in.
- Traces (OpenTelemetry) (opens in a new tab)DocsFree
What a span, a trace and a parent-child link are, with the fields every span carries.
Helps to know first
110 questions · last verified 2026-12