Skip to content

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

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?

  1. AApplication Insights classic SDK 2.x with the instrumentation key hard-coded in each service
  2. BCustom HTTP calls from each service to the Log Analytics data collector endpoint
  3. CThe OpenTelemetry Distro in each service, reading the connection string from APPLICATIONINSIGHTS_CONNECTION_STRING
  4. 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.

Question 2 · choose 2

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.)

  1. AThe default Build completes notification, left turned on for every project member
  2. BAn Application Insights availability test against each pipeline's web page
  3. CA workflow status badge for each deployment workflow on the team's wiki page
  4. DA custom Azure DevOps notification subscription for completed builds, filtered to the failed status and delivered to the on-call distribution list
  5. 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.

Question 3 · choose 1

An App Service app's HTTP logs must be queried with KQL alongside other telemetry. What sends them to a Log Analytics workspace?

  1. AAn action group
  2. BA deployment slot
  3. CAn availability test
  4. 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.

Question 4 · choose 1

An alert rule must notify the on-call team by SMS and call a webhook. Where are those actions defined?

  1. AIn an action group
  2. BIn a diagnostic setting
  3. CIn a workbook
  4. DIn a data collection rule
Show the answer and why
  • AIn an action group

    Correct

    Action groups hold notifications and actions for alerts.

  • BIn a diagnostic setting

    Incorrect

    Diagnostic settings route logs.

  • CIn a workbook

    Incorrect

    Workbooks are reports.

  • DIn a data collection rule

    Incorrect

    Data collection rules define what data agents collect.

An action group is a collection of notification preferences and actions, such as email, SMS, webhooks or functions, that alerts use when they fire.

Question 5 · choose 1

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?

  1. ATurn off smart detection and write custom queries
  2. BForward the emails to the on-call mailbox
  3. CMigrate smart detection to alert rules
  4. 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.

Question 6 · choose 1

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?

  1. AUsage analysis
  2. BLive metrics
  3. CSmart detection
  4. 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.

Practise domain 5 →Practise all domains →