| title | DevUI Tracing & Observability |
|---|---|
| description | Learn how to view OpenTelemetry traces in DevUI for debugging and monitoring your agents. |
| author | moonbox3 |
| ms.topic | how-to |
| ms.author | evmattso |
| ms.date | 12/10/2025 |
| ms.service | agent-framework |
| zone_pivot_groups | programming-languages |
DevUI provides built-in support for capturing and displaying OpenTelemetry (OTel) traces emitted by the Agent Framework. DevUI does not create its own spans - it collects the spans that Agent Framework emits during agent and workflow execution, then displays them in the debug panel. This helps you debug agent behavior, understand execution flow, and identify performance issues.
::: zone pivot="programming-language-csharp"
DevUI documentation for C# is coming soon. Please check back later or refer to the Python documentation for conceptual guidance.
::: zone-end
::: zone pivot="programming-language-python"
Enable tracing when starting DevUI with the --tracing flag:
devui ./agents --tracingThis enables OpenTelemetry tracing for Agent Framework operations.
When tracing is enabled, the DevUI web interface displays trace information:
- Run an agent or workflow through the UI
- Open the debug panel (available in developer mode)
- View the trace timeline showing:
- Span hierarchy
- Timing information
- Agent/workflow events
- Tool calls and results
Agent Framework emits traces following OpenTelemetry semantic conventions for GenAI. A typical trace includes:
Agent Execution
LLM Call
Prompt
Response
Tool Call
Tool Execution
Tool Result
LLM Call
Prompt
Response
For workflows, traces show the execution path through executors:
Workflow Execution
Executor A
Agent Execution
...
Executor B
Agent Execution
...
When using DevUI programmatically with serve(), tracing can be enabled:
from agent_framework.devui import serve
serve(
entities=[agent],
tracing_enabled=True
)DevUI captures and displays traces emitted by the Agent Framework - it does not create its own spans. These are standard OpenTelemetry traces that can also be exported to external observability tools like:
- Jaeger
- Zipkin
- Azure Monitor
- Datadog
To export traces to an external collector, set the OTLP_ENDPOINT environment variable:
export OTLP_ENDPOINT="http://localhost:4317"
devui ./agents --tracingWithout an OTLP endpoint, traces are captured locally and displayed only in the DevUI debug panel.
::: zone-end
For more details on Agent Framework observability:
- Observability - Comprehensive guide to agent tracing
- Workflow Observability - Workflow-specific tracing
- Security & Deployment - Secure your DevUI deployment
- Samples - Browse sample agents and workflows