Distributed Tracing for AI Agents with OpenTelemetry

Coding Crash Courses
1,613 views •

Your AI agent is slow — but which service, model call or tool caused it? In this video, we add end-to-end distributed tracing to a multi-agent system using OpenTelemetry and W3C Trace Context. We follow one request from the orchestrator through multiple agents and MCP servers, while preserving the same trace across every network call. You’ll learn: * What traces, spans and parent spans actually are * How the `traceparent` header works * The difference between `trace_id`, `span_id` and `parent_span_id` * How context propagates through HTTP, A2A and MCP * How to instrument FastAPI and HTTPX automatically * How to create custom spans and attributes in Python * How to find slow agents, tools and model calls The demo uses Python, FastAPI, OpenTelemetry, A2A, MCP and MLflow as the telemetry backend. Code: https://github.com/Coding-Crashkurse/Distributed-OTEL-Tracing

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close