AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
You are troubleshooting an Azure Function that intermittently throws exceptions. You have enabled Application Insights. You need to capture the exact line of code that caused the exception, even for exceptions that occur during high load. Which feature should you use?
⚠ Common exam trap
Many exam-takers confuse Profiler (performance tracing) with Snapshot Debugger (exception debugging), assuming both capture code-level details, but only Snapshot Debugger provides the exact line of code and variable state at the moment of failure.
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
✓
Snapshot Debugger
Snapshot Debugger is the correct choice because it captures a point-in-time snapshot of the call stack and local variables at the exact line where an exception occurs, even under high load. This allows you to see the precise line of code and state that caused the failure, which is essential for diagnosing intermittent exceptions. Application Insights integrates Snapshot Debugger to automatically collect these snapshots for thrown exceptions without requiring manual instrumentation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Snapshot Debugger
Why this is correct
The Snapshot Debugger is specifically designed to diagnose intermittent issues in live Azure applications by automatically collecting debug snapshots when an exception occurs. It captures the full call stack and local variables at the exact moment of the exception, without impacting the running application's performance. This allows developers to inspect the state of the application at the point of failure, even for non-reproducible errors, making it ideal for troubleshooting intermittent exceptions in an Azure Function.
- ✗
Application Insights Profiler
Why it's wrong here
Application Insights Profiler is primarily used for performance analysis, identifying the "hot paths" in your code that consume the most time during request execution. While it provides detailed traces of method calls and execution times, it is not designed to capture the full debug state, including local variables and call stack, at the precise moment an exception is thrown. Therefore, it's ineffective for diagnosing the root cause of intermittent exceptions by inspecting the application's state at failure.
- ✗
Live Metrics Stream
Why it's wrong here
Live Metrics Stream provides a real-time, high-level view of an application's performance, including incoming requests, failures, server CPU, and memory usage. It offers immediate operational insights and helps confirm if a deployment was successful or if issues are emerging. However, it does not capture detailed diagnostic information like call stacks or local variables at the point of an exception, making it unsuitable for deep-diving into the cause of intermittent errors.
- ✗
SQL Insights
Why it's wrong here
SQL Insights is a specialized monitoring solution within Azure Monitor designed specifically for monitoring the performance and health of Azure SQL Database, Azure SQL Managed Instance, and SQL Server on Azure VMs. It focuses on database-specific metrics, query performance, and resource utilization within the SQL environment. It has no capability to monitor or diagnose exceptions occurring within the application code of an Azure Function itself.
Go deeper
Related to this question
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 →
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.