Agent Tracing & Debugging
Instrument agents so every model call, tool call and decision is traceable, then use traces to find failures and attribute cost and latency to steps.
3 objectives 6 steps about 110 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Instrument an agent with nested spans for runs, model calls and tool calls using the OpenTelemetry GenAI semantic conventions or an equivalent tracing SDK, with sensitive content redacted.
- Diagnose a failed run from its trace and classify the failure (tool selection, arguments, missing context, reasoning or environment).
- Attribute tokens, cost and latency to each step and identify the slowest and most expensive steps.
Lesson plan
6 steps, about 110 min · 5 of 5 lessons available so far
- Why Agents Need Traces, Not Just Logs Concept · 15 min
- Lab: Instrumenting the Loop with Spans Lab · 25 min
- Reading a Failed Trace Worked example · 20 min
- Building a Failure Taxonomy from 20 Runs Lab · 25 min
- Cost and Latency per Step Worked example · 15 min
- Check: Find the Faulty Step Knowledge check · 6 questions
Practise it
Add tracing to your agent, run it on 20 tasks, label each failure with a category from your taxonomy, and produce a table of the three most common failure types and the three most expensive steps with their share of total tokens.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own AI Chat BotIntermediate · 6–12 h
References
Hard prerequisites
None.
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.