AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
You are using Application Insights to monitor a web application. You need to create an alert that triggers when the server response time exceeds 5 seconds for more than 10% of requests in a 5-minute window. Which type of Azure Monitor alert should you create?
⚠ Common exam trap
Candidates often assume a metric alert can handle percentage-based conditions, but metric alerts only support simple aggregations (e.g., average, count, max) and cannot compute a ratio of requests meeting a custom condition without a log query.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Log alert
A log alert is correct because the condition involves querying Application Insights trace data to calculate the percentage of requests with a server response time exceeding 5 seconds within a 5-minute window. Log alerts run a Kusto query against the `requests` table, allowing aggregation and threshold evaluation (e.g., >10% of requests), which is not possible with simple metric thresholds.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Metric alert
Why it's wrong here
Metric alerts are designed to monitor specific, pre-aggregated time-series data points like CPU usage or request count. While they can track individual metrics, they lack the native capability to perform complex, real-time calculations such as dividing the count of requests exceeding a duration threshold by the total request count within a single alert rule. This makes them unsuitable for directly computing and alerting on a dynamic percentage ratio.
- ✓
Log alert
Why this is correct
Log alerts leverage Kusto Query Language (KQL) to execute custom queries against your Application Insights logs. This powerful capability allows you to filter requests by duration, count them, and then calculate the precise percentage of requests exceeding a specific threshold (e.g., 5000 ms) relative to the total requests within the evaluation period. The alert then triggers when this calculated percentage surpasses the defined custom threshold, making it ideal for complex, ratio-based performance monitoring.
- ✗
Activity log alert
Why it's wrong here
Activity log alerts are specifically designed to monitor events occurring at the Azure resource level, such as resource creation, deletion, updates, or security-related actions. They operate on the Azure Activity Log, which records control plane operations, not data plane metrics like application performance. Therefore, they cannot be used to track or alert on application-specific performance metrics like request duration or error rates within a web application.
- ✗
Application Insights smart detection alert
Why it's wrong here
Application Insights smart detection automatically uses machine learning algorithms to identify unusual patterns, performance degradations, or failure anomalies in your application's telemetry data without requiring manual configuration. While it provides valuable insights into potential issues, it does not allow users to define custom, static thresholds for specific metrics or ratios, such as a precise percentage of slow requests. Its purpose is anomaly detection, not custom threshold-based alerting.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.