Domain 4 of 4

Secure, monitor, and troubleshoot Azure solutions

Domain · 20–25% of the AI-200 exam

Nothing in this domain arrives on its own

A Python service on Azure can keep using the database password that was rotated away from it last night, keep serving a feature flag that someone switched an hour ago, and swallow the exception its own team then cannot find anywhere in the portal, with nothing wrong in the code and no error in any log. That gap is the organizing idea of the whole domain: a running process sits between two flows it does not control, and every hop in both directions has to be enabled by something outside the process. Going into the process are settings and secrets, which arrive only because an identity holds a role assignment, a reference was written in the form that follows a rotation, and a refresh was actually triggered. Coming out of the process is telemetry, which exists only because something instrumented the code, the span survived sampling, and a collection setting was in place before the event happened. The exam trap this model dodges is the scenario written to read like an application bug when the missing piece is one of those enabling steps, so the fix is a grant, a reference form, a trigger, or a collection setting rather than a change to the code.

The domain unfolds in four steps, from where a credential lives to how you read back what happened

Read the subtopics in order and the two flows join up. Secure secrets with Azure Key Vault settles where a credential lives so that the only thing left in configuration is a vault URL, and what a rotation actually moves; reach for it when the scenario names a password, a connection string, a certificate, or an encryption key. Store and retrieve settings with Azure App Configuration owns everything that is not a secret, as one key-value store where a label gives the same key a different value per environment, a feature flag switches behaviour without a redeployment, and a Key Vault reference holds a pointer the store deliberately never resolves itself, which is why one workload needs a grant on both services. Trace distributed systems with OpenTelemetry opens the outbound flow: how a span is produced, what the Azure Monitor distribution turns on for you, and at which of four points volume gets cut. Analyze logs and metrics with KQL (Kusto Query Language) closes it by reading the result back, starting with the scope and time window that decide what is eligible before any operator runs. The two halves mirror each other. The first pair both answer where a value comes from and what makes a change reach the app; the second pair both answer what was recorded and how you find it, joined by a single operation ID that carries the span's trace identifier into the stored rows.

When two answers both work, take the one the platform performs for you

Across all four surfaces the rewarded option is the one configured once, in one place, instead of coded around. An App Service application setting written as @Microsoft.KeyVault(...) is resolved by the platform using the app's managed identity, and Microsoft's own phrasing is that no code changes are required, so it beats a hand-written retrieval whenever the secret is simply configuration at startup. A label beats a key-naming convention you invented, because the key your code asks for never has to change. One sentinel key beats watching every setting individually, and the refresh it guards is still a check your code triggers rather than a push. The distribution's own sampler argument beats a hand-built pipeline, and the guidance for a distributed system is uniformity across components rather than clever per-service tuning. In KQL the engine's datetime and term indexes beat a scan, which is why a time predicate goes first and has beats contains. Your own code earns its place at exactly the moments the platform cannot anticipate: a value needed mid-request rather than at startup, a host with no application-settings mechanism, a library outside the bundled instrumentation set, or an exception your handler catches before anything else can see it.

The two directions across the process boundary, and the subtopic that owns each surface

DirectionWhat crosses the boundaryThe enabling step nothing works withoutDrill into
Into the processA credential the app must not carry: a password, connection string, certificate, or encryption keyA role assignment for the workload's identity, plus an identifier written versionless or versioned, which decides whether a rotation ever reaches the appSecure secrets with Azure Key Vault
Into the processEverything that is not a secret: per-environment values, feature flags, and a pointer at a vault secretA refresh your code triggers after the interval has elapsed, because nothing is pushed to a running processStore and retrieve settings with Azure App Configuration
Out of the processSpans describing one distributed operation, exported to Application InsightsInstrumentation that produces the span, and a sampling decision the span has to surviveTrace distributed systems with OpenTelemetry
Out of the processThe stored rows, read back as requests, dependencies, log records, and metricsThe right query scope and time window before any operator runs, and a diagnostic setting for anything the app itself never sawAnalyze logs and metrics with KQL

Subtopics in this domain