Agent Health Monitoring in Azure AI and OpenAI Agents SDK
Native tracing shows what agents did, not whether it was right.

Traditional error monitoring fails for AI agents because a request can succeed even when the agent does the wrong thing. Agent health monitoring in Azure AI Foundry and the OpenAI Agents SDK must assess semantic correctness and behavioral drift against the agent’s instructions alongside uptime, latency, and error rates. Native tracing and evaluation provide evidence, but they do not automatically establish whether an agent did what it was supposed to do.
Why traditional error monitoring fails for AI agents
A refund agent can return HTTP 200 while bypassing an approval threshold and causing financial loss. The request succeeded at the infrastructure layer. The failure occurred in the decision the agent made, so an error monitor looking for failed requests has no corresponding error to report. Uptime, error rates, and latency measure whether the system responded and how quickly.
This distinction changes the unit of health from a service response to an agent’s behavior. Infrastructure signals are still needed to find services that are down and requests that are slow, but they cannot tell whether the agent did the task correctly. Agent monitoring therefore needs both an account of what happened and a way to compare that account with what was authorized and intended.

What agents on these platforms actually fail at — a working taxonomy

Microsoft AI Red Team’s v2.0 taxonomy grew from 27 to 34 failure modes, adding seven categories after a year of red-teaming systems that had been deployed. The update was made in April 2026 and announced in June 2026. The additions reflect growth in the MCP ecosystem, wider use of open-source frameworks, and computer-use agents moving into production. The earlier April 2025 taxonomy had identified agent compromise, injection, impersonation, and flow manipulation, together with existing failures amplified by agentic systems.
Goal Hijacking redirects the agent’s terminal goal through adversarial instructions that appear aligned with a legitimate task, without fully compromising the underlying agent. Session Context Contamination instead plants data early in a session that skews later reasoning without triggering a safety check on its own. Inter-Agent Trust Escalation crosses a different boundary. A compromised agent claims a false identity or higher permissions to an orchestrator that does not verify the claim.
Agentic Supply Chain Compromise allows a compromised MCP server or plugin registry to inject natural-language instructions without changing a binary. MCP / Plugin Abuse includes poisoned tool descriptions, server-injected instructions, and one server overriding another. The tool interface itself becomes an instruction surface. These categories distinguish a tool that fails to execute from a tool definition that successfully persuades the agent to do the wrong thing.
A complementary practitioner taxonomy groups failures into planning errors, tool errors, retrieval errors, reasoning errors, and safety and policy violations. Each points to a different repair surface, namely the planner, tool layer, retriever, generator, or output scanner. Each also produces a different trace fingerprint. The value of this vocabulary is diagnostic rather than exhaustive, because identifying the failure’s origin helps separate a correction to orchestration from a correction to retrieval or generated output.
How Azure AI Foundry's native observability works and what it actually covers
Azure AI Foundry provides Evaluation, Monitoring, and Tracing, with deep integration into Azure Monitor. Microsoft announced the three core capabilities as generally available in March 2026, but Monitoring and parts of Tracing for workflows and external agents remain in preview. The broader availability announcement does not make every monitoring feature suitable for production workloads, and Microsoft does not recommend preview items for those workloads.
Foundry’s OpenTelemetry-based distributed tracing follows requests through model calls, tool invocations, retrieval steps, orchestration logic, and cross-agent handoffs. Deployment determines how much configuration this requires. The Microsoft Agent Framework treats agents as managed workloads, with automatic tracing when they run on Foundry Hosted Agents. In that deployment path, its OpenTelemetry traces flow into Application Insights with no extra wiring. Agents hosted outside Foundry require explicit OpenTelemetry configuration.
The OpenAI Agents SDK takes a different path into the same observability environment. It automatically captures model generations, tool calls, handoffs, and guardrails, but it has no native Foundry export. Its built-in traces do not automatically reach Application Insights. Routing SDK activity there requires added OpenTelemetry instrumentation and export to Azure Monitor, while another compatible telemetry backend is also an option. This distinction separates having agent traces from having them integrated with the surrounding Azure system.
Foundry’s Continuous Evaluation spans local development, CI/CD pipelines, and production traffic monitoring, using the same evaluators across those contexts. That consistency gives a score the same meaning across lifecycle stages. Out-of-the-box evaluators include Intent Resolution, Task Adherence, Tool Call Accuracy, and Task Completion. GitHub Actions integration and Azure DevOps extensions support automatic evaluation on every commit and version comparisons using built-in quality, performance, and safety metrics.
However, several of the most behaviorally relevant evaluators remain in preview. Task Adherence, Task Completion, Intent Resolution, Customer Satisfaction, Output Quality, and Tool Use Quality all have that status, as do agent metrics, recurring evaluations, red team scans, and alerts. Multi-turn evaluation was in public preview as of Build 2026. It scores full multi-step conversations for context carryover, reasoning consistency, and end-to-end task success, addressing failures that emerge as context accumulates. That coverage is useful, but its availability status limits its role as a production safety net.
How the OpenAI Agents SDK's built-in tracing works and where its boundaries are
The OpenAI Agents SDK records LLM generations, tool calls, handoffs, guardrails, and custom events during an agent run. Its OpenAI Traces dashboard supports viewing those records in development and production. The span vocabulary is detailed. It includes task, agent, turn, generation, response, function, handoff, guardrail, and custom spans, with generation and response represented as distinct types. Function spans correspond to tool invocations, handoff spans identify source and destination agents, and guardrail spans record whether the tripwire fired.
The default export pipeline explains why those traces appear without configuration. A BatchTraceProcessor batches spans in the background and flushes them every few seconds to a BackendSpanExporter. The exporter uploads them to OpenAI’s trace ingestion endpoint. This gives the SDK an immediately available record of agent execution, but places that record in OpenAI’s dashboard, separate from the rest of the system’s telemetry. The distinction becomes important when an agent’s apparent slowness originates outside the agent run.
For example, a tool may call a slow downstream API, or a specialist may read from a database. The built-in viewer cannot show the activity in the surrounding infrastructure that caused that delay. OpenTelemetry export closes this correlation gap. It makes the agent run part of the same distributed trace as the services around it, allowing agent activity and infrastructure behavior to be examined together. This improves diagnosis of execution problems without, by itself, judging whether the agent’s decisions were correct.
For teams redirecting traces to an enterprise backend, the SDK exposes two different configuration choices. add_trace_processor() adds processing that can send traces to another backend while retaining export to OpenAI’s endpoint. set_trace_processors() replaces the whole pipeline, so nothing reaches OpenAI unless explicitly configured. Sensitive content has a separate control. Model spans record inputs and outputs by default, while function spans record tool arguments and return values, and setting trace_include_sensitive_data=False in RunConfig omits that content.
The failure modes that native tracing and evaluation don't catch
Foundry’s evaluators add judgments about quality and task performance to the execution record provided by a complete trace, but neither native stack automatically establishes correctness against every agent’s own instructions. Goal hijacking and session context contamination can produce outputs that pass schema and latency checks while departing from the intended task. The dashboard can thus stay green while users get bad outputs, leaving people to spot most of the problems for days or weeks.
In inter-agent trust escalation, the SDK’s handoff span records the handoff event and the source and destination agents. It does not validate the legitimacy of claimed permissions. If a compromised agent claims higher privileges to an orchestrator that never verifies them, the trace can faithfully document an execution that should not have been authorized.
MCP tool poisoning exposes a similar boundary earlier in execution. A poisoned description can redirect behavior through natural-language instructions before tool-call schema validation occurs. The resulting function call may be structurally valid. Its valid arguments do not establish that the agent selected the tool for the right reason or pursued the authorized goal. Microsoft’s June 2026 update reported that the MCP ecosystem had 99 CVEs in 2025 alone, and monitoring that sees only post-execution spans has already missed the point where the injection entered in this failure pattern.
Task Adherence, Tool Use Quality, and Intent Resolution are especially relevant to deviations in purpose and tool selection, yet all remain in preview in Foundry. These gaps reflect different responsibilities, because tracing records execution, evaluation applies defined criteria, and instruction-grounded monitoring must detect departures from the specific behavior the agent was authorized to perform.
What a complete agent health monitoring approach covers that the platforms leave open
To close these gaps, teams need monitoring that treats the agent’s own instructions as the ground truth for behavioral correctness. Every trace is evaluated against what the agent was instructed to accomplish, with deviations surfaced as behavioral issues. This makes intent an explicit monitoring input. For the refund example, the check must cover both whether the refund request succeeded and whether the agent followed the approval threshold.
A single anomalous trace can be noise, while the same deviation across many traces identifies a failure mode. Automatic clustering turns those repetitions into actionable issues without requiring engineers to predefine a rule for every possible failure. The pattern becomes the unit of investigation. This is especially important when the execution remains technically valid and there is no exception around which to organize an incident.
For detection to lead to remediation, the resulting issue needs a place in the developer’s existing workflow. Surfacing issues in Slack, linking directly to the relevant trace, and integrating with coding agents allows fixes without shifting into a separate monitoring console. Existing instrumentation should remain useful. Teams using the OpenAI Agents SDK, Vercel AI, LangGraph, or Azure-native frameworks need compatible coverage, rather than a parallel tracing requirement that forces them to rebuild the agent stack.
A production-grade layer needs to run on every deploy and alert when behavior drifts from an established baseline, especially given Foundry’s preview dependencies and the SDK viewer’s development-oriented design. Delayed detection leaves behavioral failures in service. In one 2026 incident, detection latency reached 60 days, illustrating why a trace available for later inspection is not equivalent to an automatically surfaced regression.
The monitoring layer also handles sensitive user interactions, so it needs SOC 2 compliance and tenant data isolation as part of its basic requirements. These are operating constraints. They apply to the system that receives production traces, just as the SDK’s sensitive-data setting applies to what those traces contain.
Sources
- Updating the taxonomy of failure modes in agentic AI systems: What a year of red teaming taught us
- New whitepaper outlines the taxonomy of failure modes in AI agents
- Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents
- Monitoring & Observability in Microsoft Foundry
- Operating AI Agents on Azure: Observability with Azure AI Foundry
- Build 2026: From observability to ROI for AI agents on any framework


