Implementing End-to-End Tracing for Microsoft Foundry Agents
Short answer
BC Use OpenTelemetry to instrument the Python service and Application Insights to store and visualize the distributed traces for the Foundry agent.
Question
The agent is invoked from a Python service that does NOT run in the Foundry portal.
You need to implement end-to-end tracing to capture latency breakdowns and exceptions across agent runs.
Which two components can you use? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
Key Takeaways
The trap is selecting Log Analytics instead of Application Insights; while Log Analytics stores the data, Application Insights provides the specific distributed tracing experience and native integration required for end-to-end visibility.
Learn how to implement end-to-end tracing for Microsoft Foundry agents invoked from external services using OpenTelemetry instrumentation and Application Insights storage.
Common mistake: Selecting A (Log Analytics Workspace) because it is the underlying data repository. However, Log Analytics alone does not provide the distributed tracing UI or the specific agent correlation features that Application Insights offers when linked to a Foundry project.
Expert Analysis
Distributed Tracing Architecture in Microsoft Foundry The question requires implementing end-to-end tracing for a prompt agent invoked from an external Python service. The core challenge is bridging the boundary between the customer's application and the managed Foundry environment.
OpenTelemetry (Option C) as the Instrumentation Standard Microsoft Foundry agents are built on standards that support OpenTelemetry. To capture telemetry data such as latency and exceptions, the external Python service must emit traces using the OpenTelemetry API. This ensures that spans representing the agent call are standardized and compatible with downstream collectors. Without this instrumentation layer, the external service cannot generate the structured trace data required for analysis.
Application Insights (Option B) as the Storage and Visualization Target Once the Python service emits OpenTelemetry-compliant traces, they must be ingested into a storage and analytics solution. Microsoft Foundry projects integrate natively with Azure Application Insights. By linking the Foundry project to an Application Insights resource, the traces emitted by the external service (via OpenTelemetry) are automatically correlated with internal agent runs. This provides the requested "end-to-end" visibility, allowing users to inspect span timelines, latency breakdowns, and exceptions across the entire workflow.
Why Other Options Fail
- Log Analytics (A) is the backend data store for Application Insights but does not provide the specific distributed tracing visualization or integration logic itself; it is too low-level.
- Azure Monitor Agent (D) is primarily used for collecting infrastructure metrics and logs from VMs/containers, not for application-level distributed tracing of HTTP/gRPC calls in this context.
- Microsoft Sentinel (E) is a SIEM/SOAR solution for security analytics, not for operational performance tracing of AI agent latency.
Exam Strategy
When a question asks for 'end-to-end' tracing involving an external application and a cloud service, look for the combination of an instrumentation standard (like OpenTelemetry) and a dedicated distributed tracing platform (like Application Insights). Do not confuse the raw data store (Log Analytics) with the specialized analytics tool (Application Insights) that provides the necessary correlation views.
Frequently Asked Questions
Can I use just Log Analytics for Foundry agent tracing?
Does the Python service need to run in Foundry to trace?
Community Votes
50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
RICHARDALEX007 👍 2For end-to-end tracing of agent runs from an external Python service, OpenTelemetry instruments the code and Application Insights stores/visualizes the traces - each is a complete tracing solution as worded. A Log Analytics workspace (A) backs App Insights but is not itself the tracing capability; Azure Monitor Agent (D) and Sentinel (E) are not used for agent run tracing
-
8ac3742 👍 1Application Insights (Option B):Microsoft Foundry projects integrate natively with Azure Application Insights to provide end-to-end distributed tracing, latency breakdowns (span timelines for LLM calls, tool executions, and retrieval), and automatic exception tracking across external application calls. Connecting the Python service to the project’s linked Application Insights resource fulfills the entire requirement out of the box. OpenTelemetry (Option C):The Azure AI Foundry SDK (azure-ai-projects / prompt flow / agent framework) is instrumented directly on top of the OpenTelemetry (OTel) open standard. In a standalone Python service outside the portal, you can enable end-to-end tracing using the OpenTelemetry SDK (via azure-monitor-opentelemetry or an OTel tracer) to capture spans, measure component latency, and log exceptions to any compatible backend.
-
mromar33 👍 1For the exam, select B and C. The clue is “end-to-end” across the Python service and the Foundry agent. Microsoft Learn - B. Application Insights stores the traces and lets you inspect where time was spent and where an exception occurred. Microsoft Learn - C. OpenTelemetry instruments the Python service so its work around the agent call appears in the trace. Microsoft Learn The sample’s phrase “each correct answer presents a complete solution” is misleading. Microsoft’s documented setup uses the two together for this scenario.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AI-103 Questions
Access 88 questions with complete answers and detailed explanations.
View Full AI-103 Practice Test →