OpenTelemetry - AG2

AG2 OpenTelemetry Tracing: Full Observability for Multi-Agent Systems

Multi-agent systems are powerful -- but when something goes wrong, figuring out where and why is painful. Which agent made the bad decision? Was the LLM call slow, or did the tool fail? How many tokens did that group chat actually use?

AG2 now has built-in OpenTelemetry tracing that gives you full visibility into your multi-agent workflows. Every conversation, agent turn, LLM call, tool execution, and speaker selection is captured as a structured span -- connected by a shared trace ID and exportable to any OpenTelemetry-compatible backend.

Key highlights:

What is OpenTelemetry Tracing?

OpenTelemetry is the industry-standard framework for observability in distributed systems. At its core, tracing captures the path of a request through your system as a tree of spans -- each span representing a unit of work (an LLM call, a tool execution, an agent turn) with timing, attributes, and parent-child relationships.

A few key concepts:

For multi-agent systems, tracing answers questions like:

AG2's tracing follows the OpenTelemetry GenAI Semantic Conventions so your agent traces are structured in a considered, agentic, way.