AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
Your Azure web app is running in a production environment. Users report that the app is slow. You need to identify the root cause without impacting production traffic. Which approach should you use?
⚠ Common exam trap
A common mix-up: candidates confuse high-level monitoring (logs, metrics) with diagnostic profiling, assuming that more data (100% sampling) or separate testing (staging slot) will solve the problem, when in fact Profiler is the only tool designed for low-overhead, code-level latency analysis in production.
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
✓
Enable Application Insights Profiler
Application Insights Profiler provides detailed, per-request performance traces that pinpoint which code paths are consuming the most time, enabling root cause analysis of slow responses without altering production traffic. Unlike sampling or logs, Profiler captures execution data on-demand or automatically with minimal overhead, making it ideal for diagnosing latency issues in a live environment.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Enable Application Insights Profiler
Why this is correct
Application Insights Profiler is specifically designed for diagnosing performance issues in production environments with minimal impact. It continuously collects detailed execution traces, including CPU usage, garbage collection events, and call stacks, allowing developers to pinpoint exact code paths, database queries, or external service calls that are contributing to slowness. This granular visibility into application behavior is crucial for identifying root causes of performance bottlenecks without requiring code changes or redeployments.
- ✗
Enable Application Insights sampling at 100%
Why it's wrong here
Enabling Application Insights sampling at 100% would force the collection and transmission of *all* telemetry data, including requests, dependencies, and exceptions, without any reduction. While this provides complete data, it significantly increases the overhead on the application due to increased CPU usage for serialization, network egress for data transmission, and storage costs. In a production environment already experiencing slowness, this additional load could exacerbate the performance problem rather than help diagnose it, making adaptive sampling a more appropriate choice.
- ✗
Run a load test in a staging slot
Why it's wrong here
Running a load test in a staging slot is an unreliable method for diagnosing production performance issues because staging environments often differ significantly from production. These differences can include data volume and characteristics, underlying infrastructure scale units, network topology, and specific configuration settings. Consequently, a load test in staging may not accurately reproduce the exact conditions or user behaviors that are causing the slowness in the live production system, leading to misleading results or a failure to identify the true bottleneck.
- ✗
Review server logs in the web app
Why it's wrong here
Reviewing generic server logs, such as IIS logs for an Azure Web App, provides high-level request information like URL, HTTP status code, client IP, and the total time taken by the server to process the request. However, these logs lack the granular detail necessary to diagnose specific application-level performance bottlenecks, such as slow internal method executions, inefficient database queries, or latency in calls to external APIs. They do not offer insights into the application's internal call stack or dependency timings, which are critical for root cause analysis of code-level slowness.
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.