AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
Exhibit
Refer to the exhibit. ```kql requests | where timestamp > ago(1d) | summarize count() by bin(timestamp, 1h), resultCode | where resultCode == 500 | render timechart ```
You query Application Insights with the KQL query in the exhibit. The chart shows a spike in 500 errors at 2:00 PM. What is the next step to diagnose the cause?
⚠ Common exam trap
It's easy for candidates to confuse diagnostic steps with remediation actions, choosing to scale up (Option C) or run a profiler (Option D) instead of first investigating the actual error data via exceptions and traces.
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
✓
Query exceptions and traces for the 2:00 PM hour
When a spike in 500 errors is detected in Application Insights, the next logical step is to query exceptions and traces for the specific time period (2:00 PM). This allows you to correlate the error count with detailed exception messages, stack traces, and dependency calls, which directly reveal the root cause of the failures. KQL queries like `exceptions | where timestamp between (datetime(14:00) .. datetime(15:00))` or joining with `traces` provide the granular data needed for diagnosis.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Check availability tests for the same period
Why it's wrong here
Azure Application Insights availability tests primarily monitor the external reachability and response time of a web application or API endpoint from various global locations. While they can detect if an application is completely down or unresponsive, they do not provide detailed insights into specific internal application errors, exceptions, or code-level failures occurring within the application's runtime. Therefore, checking availability tests alone would not pinpoint the root cause of application errors reported by KQL queries.
- ✓
Query exceptions and traces for the 2:00 PM hour
Why this is correct
Querying "exceptions" and "traces" tables in Application Insights for the specific 2:00 PM hour is the most effective diagnostic step. The "exceptions" table captures details of unhandled exceptions thrown by the application, including stack traces and error messages, directly indicating code failures. Correlating these with "traces" (custom log messages) provides crucial contextual information, such as variable states or execution flow leading up to the exception, enabling a precise root cause analysis.
- ✗
Scale up the App Service plan
Why it's wrong here
Scaling up the App Service plan increases the computational resources (CPU, memory) available to the application, primarily addressing performance bottlenecks or capacity issues under heavy load. However, it is a mitigation strategy for resource exhaustion, not a diagnostic step for identifying the root cause of application errors or exceptions. Increasing resources will not resolve underlying code defects or configuration issues that are causing errors to occur.
- ✗
Run a profiler on the 2:00 PM time range
Why it's wrong here
Running a profiler, such as the Application Insights Profiler, is primarily designed to identify performance bottlenecks within an application by analyzing CPU usage, memory allocation, and method execution times. While it can show which code paths are being executed, its main purpose is to pinpoint slow code, not to diagnose the occurrence or specific details of application errors or exceptions. Therefore, it would not directly reveal the cause of errors reported by KQL.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.