AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
You are using Application Insights to monitor an ASP.NET Core web API. Users report that a specific endpoint is slow, but you cannot reproduce the issue in development. You need to identify which line of code is causing the delay in production. Which Application Insights feature should you use?
⚠ Common exam trap
Candidates often confuse the Snapshot Debugger (for exceptions) with the Profiler (for performance), or assume custom telemetry is the only way to get timing data, missing that the Profiler provides automatic, line-level diagnostics without code changes.
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 is designed specifically to trace code-level performance issues in production without requiring code changes or reproducing the problem. It captures detailed call stacks and timing for each request, allowing you to identify exactly which line of code is causing the delay. This makes it the correct choice for diagnosing a slow endpoint that cannot be reproduced in development.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the Application Insights Map to visualize dependencies.
Why it's wrong here
The Application Map provides a high-level visual representation of service dependencies and their overall health, showing bottlenecks between different components or external services. However, it operates at a transactional level, not a code execution level, meaning it cannot drill down into the specific methods or lines of code within a single service that are causing performance degradation. It helps identify which service is slow, but not why internally.
- ✓
Enable Application Insights Profiler.
Why this is correct
Application Insights Profiler is the correct tool because it automatically collects detailed execution traces for requests, capturing the call stack and timing for each method invocation. This allows developers to precisely identify the 'hot path' within their code, revealing exactly where CPU time is being spent and pinpointing the specific lines of code responsible for performance bottlenecks without manual instrumentation. It provides deep, method-level insights into application performance.
- ✗
Use the Snapshot Debugger to capture debug snapshots on exceptions.
Why it's wrong here
The Snapshot Debugger is designed for post-mortem debugging of exceptions in production environments, capturing a snapshot of the application's state, including variables and the call stack, at the moment an exception occurs. It is not intended for general performance analysis during normal, non-exceptional execution, as it only activates upon unhandled exceptions and does not profile typical request execution paths. Its purpose is to diagnose why an exception occurred, not to find general performance bottlenecks.
- ✗
Create a custom telemetry event in the slow endpoint to log timing data.
Why it's wrong here
While creating custom telemetry events can log timing data for specific operations or endpoints, it requires manual instrumentation and provides only the aggregated duration of the instrumented block. This approach lacks the automatic, deep call stack analysis and method-level timing that is crucial for pinpointing the exact line of code causing slowness. It offers limited insight compared to an automatic profiler for detailed code performance issues, demanding significant development effort for granular data.
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.