Lab 6 Understand Tracing
Introduction¶
Tracing helps you understand and debug your agent's behavior by showing the sequence of steps, inputs, and outputs during execution. In Azure AI Foundry, tracing lets you observe how your agent processes requests, calls tools, and generates responses. You can use the Azure AI Foundry portal or integrate with OpenTelemetry and Application Insights to collect and analyze trace data, making it easier to troubleshoot and optimize your agent.
View Traces¶
You can view the traces of your agent's execution in the Azure AI Foundry portal or by using OpenTelemetry. The traces will show the sequence of steps, tool calls, and data exchanged during the agent's execution. This information is crucial for debugging and optimizing your agent's performance.
Using Azure AI Foundry Portal¶
To view traces in the Azure AI Foundry portal, follow these steps:
- Navigate to the Azure AI Foundry portal.
- Select your project.
- Select the Tracing tab in the left-hand menu.
- Here, you can see the traces generated by your agent.
Drilling Down into Traces¶
- You may need to click on the Refresh button to see the latest traces as traces may take a few moments to appear.
- Select the trace named
Zava Agent Initialization
to view the details. - Select the
create_agent Zava DIY Sales Agent
trace to view the details of the agent creation process. In theInput & outputs
section, you'll see the Agent instructions. - Next, select the
Zava Agent Chat Request: Write an executive...
trace to view the details of the chat request. In theInput & outputs
section, you'll see the user input and the agent's response.