Courseiva

AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions

Your team uses Azure DevOps to deploy a web app to Azure App Service. The deployment fails intermittently with a '500 Internal Server Error' after successful code upload. You want to capture a memory dump of the process when the error occurs. What should you configure?

⚠ Common exam trap

Many exam-takers confuse Application Insights Snapshot Debugger (which captures lightweight exception snapshots) with a full memory dump, leading them to choose option D, even though Snapshot Debugger does not provide the comprehensive process memory required for deep debugging of 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

Use App Service Diagnostics to collect a memory dump

App Service Diagnostics provides a built-in 'Collect Memory Dump' tool that can be triggered on specific HTTP error codes, such as 500 Internal Server Error. This allows you to capture a full process dump of the web app when the error occurs, enabling offline analysis of the failure without modifying application code.

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 an autoscale rule in Azure Monitor

    Why it's wrong here

    Configuring an autoscale rule in Azure Monitor is designed to dynamically adjust the number of App Service instances based on predefined metrics or schedules, ensuring optimal performance and cost efficiency. Its primary function is resource management and scaling, not the collection of diagnostic artifacts like memory dumps. Therefore, this feature does not provide the necessary capability to capture detailed application state for debugging purposes.

  • Use App Service Diagnostics to collect a memory dump

    Why this is correct

    App Service Diagnostics is the correct and most direct tool within Azure App Service for troubleshooting and resolving application issues, including performance problems or crashes. It provides a suite of diagnostic tools, prominently featuring the ability to collect full or mini-memory dumps on demand. These dumps are crucial for in-depth post-mortem analysis, allowing developers to inspect the application's memory state and identify root causes of complex issues.

  • Set up Azure API Management policies

    Why it's wrong here

    Azure API Management policies are used to control and manage the behavior of APIs exposed through the API Management gateway, such as enforcing security, rate limits, caching, or data transformations. While essential for API governance and security, API Management operates at the API request level and has no direct functionality or integration for debugging the underlying App Service instances, nor can it initiate the collection of memory dumps from those instances.

  • Enable Application Insights Snapshot Debugger

    Why it's wrong here

    Application Insights Snapshot Debugger is a powerful feature that automatically collects a debug snapshot when an exception occurs in a live web application, providing insights into the exact line of code and variable values at the moment of the exception. However, it captures a targeted snapshot of the call stack and local variables related to a specific exception, which is distinct from a comprehensive memory dump. A memory dump provides a complete copy of the application's process memory, offering a broader view for diagnosing issues like memory leaks or deadlocks that might not manifest as immediate exceptions.

About these practice questions

One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.