AZ-400 · Domain 5: Implement an instrumentation strategy · 7% of the exam
Task 5.1: Configure monitoring for a DevOps environment
Azure Monitor and its logs wired to DevOps tools, telemetry from Application Insights, VM, container, storage and network insights, monitoring in GitHub, and alerts on GitHub Actions and Azure Pipelines events.
Study it
Azure Monitor, Application Insights and the insights for VMs, containers, storage and networks
Monitoring in GitHub and alerts on pipeline events
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.
Question 1 · choose 1
A team is building a new Python API and a new ASP.NET Core service and wants traces, metrics and logs in Application Insights through a vendor-neutral standard, with the target resource set from configuration per environment rather than hard-coded. How should the services be instrumented?
AApplication Insights classic SDK 2.x with the instrumentation key hard-coded in each service
BCustom HTTP calls from each service to the Log Analytics data collector endpoint
CThe OpenTelemetry Distro in each service, reading the connection string from APPLICATIONINSIGHTS_CONNECTION_STRING
DAvailability tests that call each service's endpoints every five minutes
Show the answer and why
AApplication Insights classic SDK 2.x with the instrumentation key hard-coded in each service
Incorrect
New apps should use OpenTelemetry, and hard-coded keys can't change per environment.
BCustom HTTP calls from each service to the Log Analytics data collector endpoint
Incorrect
Hand-written exporters skip the built-in instrumentations for requests, dependencies and logs.
CThe OpenTelemetry Distro in each service, reading the connection string from APPLICATIONINSIGHTS_CONNECTION_STRING
Correct
The Distro is the recommended OpenTelemetry instrumentation for new apps, and the connection string comes from the environment.
DAvailability tests that call each service's endpoints every five minutes
Incorrect
Availability tests check reachability from outside; they don't instrument the code.
For new apps, Microsoft recommends instrumenting with the OpenTelemetry Distro (the Microsoft OpenTelemetry Distro for .NET, Node.js and Python, the Azure Monitor OpenTelemetry Distro for Java), which collects traces, metrics and logs and exports them to Application Insights using the connection string, for example from APPLICATIONINSIGHTS_CONNECTION_STRING.
A platform team deploys with YAML pipelines in Azure Pipelines and with workflows in GitHub Actions. Whoever started a run, the on-call engineers must hear about every failed deployment run within minutes, without checking dashboards. Which two configurations should you add? (Choose TWO.)
AThe default Build completes notification, left turned on for every project member
BAn Application Insights availability test against each pipeline's web page
CA workflow status badge for each deployment workflow on the team's wiki page
DA custom Azure DevOps notification subscription for completed builds, filtered to the failed status and delivered to the on-call distribution list
EA last job in each workflow that needs the deploy jobs, runs if: failure() and posts to a Teams Workflows webhook URL for the on-call channel
Show the answer and why
AThe default Build completes notification, left turned on for every project member
Incorrect
The default subscription emails only the person who queued the run or for whom it was queued, not the on-call engineers.
BAn Application Insights availability test against each pipeline's web page
Incorrect
Availability tests probe applications; they don't report pipeline run results.
CA workflow status badge for each deployment workflow on the team's wiki page
Incorrect
A badge shows the latest status to someone who looks; it doesn't alert anyone.
DA custom Azure DevOps notification subscription for completed builds, filtered to the failed status and delivered to the on-call distribution list
Correct
A team or project subscription can filter build events by status and deliver them to a custom email address, whoever queued the run.
EA last job in each workflow that needs the deploy jobs, runs if: failure() and posts to a Teams Workflows webhook URL for the on-call channel
Correct
A job with if: failure() runs only when a job it needs fails, and the Workflows webhook posts the message to the channel.
In Azure DevOps, a custom notification subscription on the Build category's completed event can filter on status and deliver to a custom email address such as an on-call distribution list, for every run in the project. In GitHub Actions, a notification job that needs the deploy jobs and runs with if: failure() can call a webhook; in Microsoft Teams, the Workflows app creates a webhook URL that posts incoming requests to a channel.
An App Service app's HTTP logs must be queried with KQL alongside other telemetry. What sends them to a Log Analytics workspace?
AAn action group
BA deployment slot
CAn availability test
DA diagnostic setting on the app
Show the answer and why
AAn action group
Incorrect
Action groups act on alerts.
BA deployment slot
Incorrect
Slots host app versions.
CAn availability test
Incorrect
Availability tests probe endpoints.
DA diagnostic setting on the app
Correct
Diagnostic settings route resource logs to destinations such as a workspace.
Diagnostic settings collect resource logs and metrics and send them to destinations such as a Log Analytics workspace, a storage account or an event hub.
A team gets smart detection emails about failure anomalies but wants them managed like its other Azure Monitor alerts, with action groups. What should it do?
ATurn off smart detection and write custom queries
BForward the emails to the on-call mailbox
CMigrate smart detection to alert rules
DAdd an availability test
Show the answer and why
ATurn off smart detection and write custom queries
Incorrect
Migration keeps the detection and manages it as alerts.
BForward the emails to the on-call mailbox
Incorrect
Email forwarding doesn't make them alerts.
CMigrate smart detection to alert rules
Correct
Migration creates alert rules for the smart detection modules.
DAdd an availability test
Incorrect
Availability tests probe endpoints.
Smart detection warns about potential performance problems and failure anomalies. Migrating it creates alert rules for the detection modules, which you manage like other alerts, including action groups.
During a production deployment, the team wants to watch request rates, failures and CPU of the app's instances with about one second of delay. Which Application Insights feature fits?
AUsage analysis
BLive metrics
CSmart detection
DWork item integration
Show the answer and why
AUsage analysis
Incorrect
Usage shows user behavior over time.
BLive metrics
Correct
Live metrics streams telemetry with about one-second latency.
CSmart detection
Incorrect
Smart detection finds anomalies after analysis.
DWork item integration
Incorrect
That creates work items from telemetry.
Live metrics monitors a running app with about one-second latency, showing request rates, failures and performance counters, which suits watching a deployment.