AZ-400 Implement an instrumentation strategy Practice Question
A company deploys a web application to Azure App Service. They want to monitor application performance and detect anomalies using Application Insights. Which two components should be configured?
⚠ Common exam trap
Watch out — candidates often confuse the Azure Monitor agent (for VMs) with the App Service diagnostics settings or Log Analytics workspaces, thinking they are required for Application Insights instrumentation, when in fact the SDK and sampling are the two core components for application performance monitoring and anomaly detection.
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
✓
Configure sampling to reduce data volume
Sampling in Application Insights reduces the volume of telemetry data while preserving statistically correct analysis, which is essential for managing cost and performance in high-traffic applications. Option D is correct because the application-side SDK (e.g., Application Insights SDK for .NET, Java, or Node.js) is required to instrument the code and collect detailed telemetry such as requests, dependencies, and exceptions for performance monitoring and anomaly detection.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploy the Azure Monitor agent on the App Service instance
Why it's wrong here
Azure Monitor agent is designed for Azure VMs and on-premises servers, not for App Service, which runs in a managed, sandboxed environment. App Service provides its own diagnostics and monitoring integration, so deploying this agent is neither supported nor relevant for anomaly detection.
- ✓
Configure sampling to reduce data volume
Why this is correct
Configuring sampling in Application Insights filters telemetry while preserving a representative subset of the data. This reduces ingestion and storage costs while still retaining enough data to detect performance anomalies, making it an effective and necessary optimization for high-volume applications.
- ✗
Create a Log Analytics workspace and configure data collection rules
Why it's wrong here
A Log Analytics workspace is the storage and query engine for telemetry, but it does not detect anomalies by itself. Anomaly detection requires alert rules, analytic queries, or machine learning capabilities built on top of the data, so simply creating a workspace and data collection rules does not directly identify anomalies.
- ✓
Enable application-side SDK for telemetry
Why this is correct
Enabling the Application Insights SDK in the application code collects rich, contextual telemetry such as request rates, response times, dependencies, and exceptions. This detailed application-level data is essential for detecting performance anomalies, as platform-level logs alone lack the granularity needed for such analysis.
- ✗
Enable diagnostics settings to stream logs to Event Hubs
Why it's wrong here
Diagnostic settings streaming logs to Event Hubs deliver platform-level logs and metrics, not the application-specific performance telemetry like HTTP requests and dependency calls that anomaly detection requires. This creates a downstream pipeline for platform data, but it does not directly address the need for application performance anomaly detection.
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.