Implementing End-to-End Tracing for Microsoft Foundry Agents

AI-103 By islever Editorial Last updated

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

You have a Microsoft Foundry project that contains a prompt agent used by a customer support web app.
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.
  1. a Log Analytics workspace
  2. Application Insights Correct Answer
  3. OpenTelemetry Correct Answer
  4. the Azure Monitor Agent
  5. Microsoft Sentinel

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?

No. While Log Analytics stores the data, Application Insights provides the specific distributed tracing capabilities, such as span timelines and automatic correlation, needed for end-to-end visibility.

Does the Python service need to run in Foundry to trace?

No. The key is using OpenTelemetry to instrument the external Python service so its traces can be sent to the Application Insights resource linked to the Foundry project.

More AI-103 FAQ →

Community Votes

B
50%
C
50%

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

  1. RICHARDALEX007 👍 2
    For 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
  2. 8ac3742 👍 1
    Application 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.
  3. mromar33 👍 1
    For 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.

Log in to comment, report an error, or add a note about this question.

Practice All AI-103 Questions

Access 88 questions with complete answers and detailed explanations.

View Full AI-103 Practice Test →

← Back to AI-103 Study Guide