Continuous Monitoring in Foundry
This lesson explains what to monitor in a generative AI application, the building blocks of Foundry monitoring, the agent monitoring dashboard, and how continuous evaluation and alerts work.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the four areas to monitor.
- Describe how Application Insights supports Foundry monitoring.
- Describe the agent monitoring dashboard.
- Explain continuous evaluation and alerts.
What to monitor
A traditional service is healthy when it is available, fast and error-free. A generative AI application can be all three and still give wrong, unsupported or unsafe answers, and its cost can rise without any change in traffic. Monitoring therefore covers four areas.
| Area | Examples | Main source |
|---|---|---|
| Quality | Groundedness, relevance, task adherence, user feedback | Continuous and scheduled evaluation |
| Safety | Content harm defect rates, red teaming findings, content filter blocks | Safety evaluation, red team scans, filter annotations |
| Performance | Latency, time to first token, throughput, errors, 429s | Azure Monitor metrics and traces |
| Cost | Tokens per request, total tokens, PTU utilization, spend | Token metrics, traces, Azure Cost Management |
Building blocks
Foundry monitoring is built on Azure Monitor. A project is connected to an Application Insights resource, backed by a Log Analytics workspace, which stores traces, evaluation results and custom telemetry. The Foundry resource publishes platform metrics for its deployments, such as requests, tokens and latency, and diagnostic settings can send its logs to Log Analytics.
-
Connect Application Insights
In the project's tracing or monitoring settings, connect an existing or new Application Insights resource.
-
Instrument the application
Send OpenTelemetry traces from the application or agents to that resource.
-
Configure evaluation
Set up continuous evaluation on live responses and scheduled evaluations or red team scans.
-
Configure alerts
Alert on quality scores, latency, token use and errors.
-
Review regularly
Use the dashboard and queries to find trends, then improve prompts, retrieval or models.
The agent monitoring dashboard
For agents in a Foundry project, the agent monitoring dashboard (preview), on the agent's Monitor tab, gathers the main indicators in one place: token usage, latency, run success rate, results of continuous and scheduled evaluations, and red teaming results. Its settings configure recurring evaluations, red team scans and alerts on latency, token usage, evaluation scores and red team findings.
Microsoft's guidance on the dashboard treats patterns such as sustained latency above about 10 seconds, or a run success rate below 95 percent, as warning signs worth investigating. Each indicator links to the underlying traces, so a drop in a score can be followed to the individual conversations that caused it.
Continuous evaluation and alerts
Continuous evaluation samples completed agent responses and runs selected evaluators on them, such as groundedness, relevance, intent resolution and safety evaluators. Sampling is random or intelligent, with a maximum number of runs per hour to control cost. Scheduled evaluations and red team scans complement it with fixed datasets and attacks.
Alerts turn monitoring into action. In the dashboard, alerts can be set on evaluation scores, latency and token usage; in Azure Monitor, metric and log alert rules on the Foundry resource and Application Insights cover errors, throttling and custom signals, and route notifications through action groups to email, chat, incident management or automation.
Prerequisites
Continuous evaluation needs Application Insights connected to the project, and the project's managed identity needs the Foundry User role. Without the role assignment, evaluation rules cannot run.
From complaint to evidence
A company runs a customer service agent in a Foundry project. It has Application Insights connected and traces flowing, but learns about quality problems only from customer complaints, days later. The team wants to detect falling answer quality on real conversations within hours, with minimal custom code.
Configure continuous evaluation for the agent with reference-free evaluators such as groundedness, relevance and intent resolution, with a sampling limit that fits the budget, and grant the project's managed identity the Foundry User role. Add an alert on the evaluation scores in the agent monitoring dashboard, and use the dashboard's links to traces to investigate low-scoring conversations.
A weekly manual review of transcripts would still be slow and sample few conversations. Alerts on latency and errors would not detect wrong answers. A scheduled evaluation on a fixed dataset would catch regressions on known questions, but not problems with new kinds of real question.
Which four aspects of a generative AI application should monitoring cover?
Show answer
Quality, safety, performance and cost. Service health alone does not show whether answers are good or safe.
Exam Tips
Remember for the exam
- Monitor quality, safety, performance and cost.
- Connect Application Insights to the project; Foundry monitoring is built on Azure Monitor.
- The agent monitoring dashboard (preview) shows tokens, latency, success rate, evaluations and red teaming.
- Continuous evaluation samples live responses; alerts fire on scores, latency and token use.