Skip to content
Microsoft Certified: Azure AI Cloud Developer Associate (AI-200) Exam Prep

Lesson 7 of 7 · 13 min

x
7/7

Domain 4: Secure, Monitor, and Troubleshoot Azure Solutions

This lesson covers 4 exam topics: Key Vault Secrets: Retrieval and Rotation, Azure App Configuration and Feature Flags, Distributed Tracing with OpenTelemetry, KQL Queries for Logs and Metrics. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.

1. Key Vault Secrets: Retrieval and Rotation

Video lesson: AI-200 25/28: Key Vault Secrets: Retrieval and Rotation

Central question: How do apps get secrets safely and rotate them?

Facts

  • Secrets are strings up to 25 KB, versioned; attributes include exp (expiration), nbf (activation) and contentType; operations include list versions, delete, purge.
  • Retrieve with the SDK (SecretClient(vault_url, DefaultAzureCredential())) or via Key Vault references in App Service/Functions; RBAC role Key Vault Secrets User for reading.
  • Best practice: use managed identity instead of secrets where possible; rotate the rest regularly.
  • Rotation pattern: Key Vault publishes SecretNearExpiry to Event Grid 30 days before expiration → Event Grid calls a Function → function generates a new credential, creates a new secret version, updates the target service.
  • References without a version pick up the latest version (App Service refetches every 24 h).

Exam traps

  • Pinning a secret version in references, blocking rotation.
  • Secrets in app settings or code.
  • Manual rotation calendars when Event Grid automation fits.

2. Azure App Configuration and Feature Flags

Video lesson: AI-200 26/28: Azure App Configuration and Feature Flags

Central question: How do you centralize settings and change behavior without redeploying?

Facts

  • App Configuration centrally manages key-values and feature flags; providers for .NET, Java Spring, JavaScript, Python, Go.
  • Keys are often hierarchical (App:Search:TopK); labels differentiate values with the same key (e.g. dev/prod); combined key-value limit 10 KB.
  • Key Vault references: App Configuration stores a reference, not the secret; the app's identity reads the secret from Key Vault.
  • Dynamic refresh: the provider refreshes configuration at runtime (e.g. ConfigureRefresh with a sentinel key or RegisterAll).
  • Feature flags: Switch (on/off), Rollout (percentage, targeting), Experiment (variants measured).

Exam traps

  • Storing secrets as plain App Configuration values. Use Key Vault references.
  • Redeploying to toggle a feature. Use a feature flag.
  • Separate stores per environment when labels work.

3. Distributed Tracing with OpenTelemetry

Video lesson: AI-200 27/28: Distributed Tracing with OpenTelemetry

Central question: How do you follow one request across services?

Facts

  • Azure Monitor collects traces, metrics and logs via OpenTelemetry distros: the Azure Monitor OpenTelemetry Distro (e.g. configure_azure_monitor()) and the newer Microsoft OpenTelemetry Distro (pip install microsoft-opentelemetry, use_microsoft_opentelemetry()); don't initialize both.
  • Connection via APPLICATIONINSIGHTS_CONNECTION_STRING; initialize before handling work.
  • Built-in instrumentation for common libraries; sampling on by default (5 requests/second).
  • Data lands in Application Insights tables such as AppRequests, AppDependencies, AppTraces, AppExceptions.

Concepts (general background)

A trace is a tree of spans; context propagates across services through the W3C traceparent header, so one operation ID links API → queue → worker → database. Add custom spans and attributes for business steps.

Exam traps

  • Initializing two distros.
  • Losing context across queues (propagate trace context in message properties).
  • Assuming 100% of telemetry is kept with default sampling.

4. KQL Queries for Logs and Metrics

Video lesson: AI-200 28/28: KQL Queries for Logs and Metrics

Central question: How do you query logs to find problems?

Facts

  • Azure Monitor Logs uses Kusto Query Language (KQL); write and test queries in Log Analytics; queries also power alerts, workbooks and the query API.
  • Common operators: take, where, project, summarize ... by, sort/top, extend, render.

Patterns (general background)

1AppRequests2| where TimeGenerated > ago(1h) and Success == false3| summarize failures = count() by Name, bin(TimeGenerated, 5m)4| render timechart
  • Latency percentiles: summarize percentile(DurationMs, 95) by Name.
  • Correlate a request with dependencies by OperationId.
  • Container logs: ContainerAppConsoleLogs_CL, ContainerLogV2.

Exam traps

  • where after summarize on raw columns that no longer exist.
  • Averages instead of percentiles for latency.
  • No time filter, scanning everything.

References

  1. AI-200 study guide — checked Oct 22, 2026
  2. About secrets — checked Oct 22, 2026
  3. Rotation tutorial — checked Oct 22, 2026
  4. Key Vault references — checked Oct 22, 2026
  5. What is App Configuration? — checked Oct 22, 2026
  6. Keys and values — checked Oct 22, 2026
  7. Feature management — checked Oct 22, 2026
  8. Enable OpenTelemetry — checked Oct 22, 2026
  9. Workspace-based tables — checked Oct 22, 2026
  10. Log queries overview — checked Oct 22, 2026
  11. Learn common KQL operators — checked Oct 22, 2026

Check your understanding

  • Event that triggers rotation?Show answer

    Answer

    SecretNearExpiry (30 days before).
  • Same key, different value per environment?Show answer

    Answer

    Labels.
  • Setting that tells the distro where to send data?Show answer

    Answer

    APPLICATIONINSIGHTS_CONNECTION_STRING.
  • Count by time buckets?Show answer

    Answer

    summarize count() by bin(TimeGenerated, 5m).
  • Role to read secrets?Show answer

    Answer

    Key Vault Secrets User.
Previous

Progress is saved in this browser.

Finish Course