AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
You deploy a web app to Azure App Service. Users report intermittent 500 errors. How should you enable detailed error logging?
⚠ Common exam trap
It's easy for candidates to confuse platform-level diagnostics (like storage or Front Door logs) with application-level telemetry, assuming any logging option will capture detailed error details, but only Application Insights provides the deep exception context needed for intermittent 500 errors.
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 for the web app
Application Insights provides built-in server-side telemetry for Azure App Service, including detailed error tracking, stack traces, and request logs. Enabling it captures the full exception details for intermittent 500 errors, which are typically unhandled exceptions or crashes in the application code. This is the most direct and integrated way to get detailed error logs without additional infrastructure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure Azure Storage account diagnostics
Why it's wrong here
Azure Storage account diagnostics monitor operations performed on Azure Storage services like blobs, queues, tables, and files, providing insights into storage access, performance, and availability. These diagnostics are focused on the storage infrastructure itself and do not capture application-level errors, exceptions, or performance issues occurring within an Azure App Service web app's code. Therefore, enabling them would not help diagnose user-reported problems originating from the web application's runtime.
- ✗
Set up Azure DNS logging
Why it's wrong here
Azure DNS logging records queries made to Azure DNS zones and the corresponding responses, offering visibility into DNS resolution activity and potential domain name resolution problems. While crucial for diagnosing connectivity issues related to domain names, these logs do not provide any information about the internal execution, runtime errors, or exceptions generated by an Azure App Service web app. User-reported issues indicating application functionality failures or crashes would not be discoverable through DNS logs.
- ✓
Enable Application Insights for the web app
Why this is correct
Application Insights, a powerful feature of Azure Monitor, is specifically designed for comprehensive monitoring of live web applications, including Azure App Service. It automatically collects vital telemetry data such as request rates, response times, failure rates, dependencies, and critically, application exceptions and custom traces from within the application's code. By integrating Application Insights, developers gain deep, real-time insights into application performance, user behavior, and can effectively identify and diagnose the root cause of user-reported errors and crashes.
- ✗
Enable Azure Front Door logging
Why it's wrong here
Azure Front Door logging captures detailed information about HTTP/HTTPS requests processed at the Front Door edge, including client IP addresses, request paths, response status codes, and latency experienced by the CDN. While valuable for analyzing traffic patterns, security incidents, and Front Door's own performance, these logs do not provide visibility into the internal execution logic, runtime errors, or exceptions that occur *within* the backend Azure App Service web app itself. They only reflect the interaction at the network edge, not the application's internal state.
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.