AZ-400 Implement an instrumentation strategy Practice Question
You are configuring Application Insights for a .NET Core web application deployed to Azure App Service. The application must capture telemetry for all HTTP requests, exceptions, and dependency calls with minimal code changes. What should you do?
⚠ Common exam trap
Watch out — candidates often assume the NuGet package (Option C) is always required for .NET Core instrumentation, overlooking the zero-code site extension option that meets the 'minimal code changes' requirement more directly.
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 the Application Insights site extension in the App Service 'Application Insights' blade.
Enabling the Application Insights site extension via the App Service 'Application Insights' blade automatically instruments the .NET Core application without requiring any code changes. This extension injects the necessary telemetry modules to capture HTTP requests, exceptions, and dependency calls at the runtime level, leveraging the Azure App Service integration for zero-code 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.
- ✓
Enable the Application Insights site extension in the App Service 'Application Insights' blade.
Why this is correct
The Application Insights site extension in the App Service 'Application Insights' blade is the correct choice because it attaches the Application Insights agent directly to the App Service runtime, automatically collecting server-side telemetry such as requests, dependencies, exceptions, and performance counters without requiring any code changes, recompilation, or redeployment.
- ✗
Configure diagnostics logging in the App Service and stream logs to Application Insights.
Why it's wrong here
Diagnostics logging in App Service captures text-based logs (application, web server, failed request tracing) and streaming them to Application Insights only forwards raw log output; it does not produce the structured telemetry (requests, dependencies, exceptions) that Application Insights relies on for end-to-end transaction monitoring, so it is insufficient for full instrumentation.
- ✗
Install the Microsoft.ApplicationInsights.AspNetCore NuGet package and add services.AddApplicationInsightsTelemetry() in Startup.cs.
Why it's wrong here
Installing the Microsoft.ApplicationInsights.AspNetCore NuGet package and adding services.AddApplicationInsightsTelemetry() in Startup.cs enables full Application Insights SDK instrumentation, but it requires modifying application code, rebuilding, and redeploying the app—contradicting the goal of minimizing code changes; the site extension accomplishes the same telemetry coverage without touching code.
- ✗
Add the Application Insights JavaScript SDK to each page.
Why it's wrong here
Adding the Application Insights JavaScript SDK to each page only captures client-side/browser telemetry such as page views, AJAX calls, and client exceptions; it does not monitor server-side request handling, dependencies, or performance counters, and requires invasive per-page code modifications, making it incomplete for server-side monitoring and contrary to the no-code-change objective.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Telemetry
Telemetry is the automatic collection, transmission, and measurement of data from remote sources to a central system for analysis and monitoring.
Key term
Application Insights
Application Insights is an Azure monitoring service that helps developers detect, diagnose, and understand issues in live web applications by collecting telemetry data like requests, exceptions, and performance counters.
About these practice questions
One of 823 original AZ-400 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-400 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-400 exam.