Question 1
A Python service must send traces, metrics and logs to Application Insights using OpenTelemetry with minimal code. What should you use?
- The Azure Monitor OpenTelemetry Distro with configure_azure_monitor() — Correct
- Azure Monitor Agent on the container
- The classic Application Insights SDK with an instrumentation key and manual tracking calls
- A custom HTTP exporter written from scratch
Correct answer
The Azure Monitor OpenTelemetry Distro with configure_azure_monitor()
Explanation
The Azure Monitor OpenTelemetry Distro configures exporters and common instrumentations with one call.
Question 2
Several microservices share settings such as API base URLs and timeouts, with different values for dev and prod. Where should these settings be centralized?
- Azure App Configuration, using labels for environments — Correct
- Each service's Docker image
- A shared Excel file
- Key Vault secrets, with one secret per setting and environment
Correct answer
Azure App Configuration, using labels for environments
Explanation
App Configuration centralizes settings, and labels let the same key have different values per environment.
Question 3
You must audit who read a particular secret in Key Vault and when. What should be enabled?
- Diagnostic settings that send AuditEvent logs to Log Analytics — Correct
- Soft delete, which records each read of a secret in the vault's version history
- A private endpoint
- Purge protection
Correct answer
Diagnostic settings that send AuditEvent logs to Log Analytics
Explanation
Key Vault audit events record data-plane operations, including secret reads, with the caller identity.
Question 4
Which code pattern lets the same application authenticate to Key Vault with a developer's credentials locally and a managed identity in Azure?
- Use DefaultAzureCredential with SecretClient — Correct
- Use a different SDK in each environment
- ManagedIdentityCredential everywhere, with a local emulator for development
- Use the vault's connection string
Correct answer
Use DefaultAzureCredential with SecretClient
Explanation
DefaultAzureCredential tries several credential sources in order, including developer tools locally and managed identity in Azure.
Question 5
An app must sign requests with a private key kept in a hardware-backed store and never exported. Which Key Vault object and tier fit?
- A certificate in App Configuration
- A secret containing the PEM-encoded key in a Standard vault
- A key stored in an app setting
- A key in a Premium vault (HSM-protected) or a Managed HSM — Correct
Correct answer
A key in a Premium vault (HSM-protected) or a Managed HSM
Explanation
HSM-protected keys in Premium vaults or Managed HSM keep key material inside hardware and allow cryptographic operations without exporting the key.
Question 6
A KQL query should show only the five slowest dependency calls to Azure OpenAI in the last hour. Which query fits?
- dependencies | where duration < 5
- dependencies | summarize count() by type
- dependencies | where target has 'openai' | take 5 | order by duration desc
- dependencies | where timestamp > ago(1h) and target has 'openai' | top 5 by duration desc — Correct
Correct answer
dependencies | where timestamp > ago(1h) and target has 'openai' | top 5 by duration desc
Explanation
Filter by time and target, then use top N by duration descending.
Question 7
You need to list the exceptions that occurred during failed requests, joined on the operation. Which KQL operator combines the two tables?
- render
- join on operation_Id — Correct
- project
- union with a where filter on operation_Id
Correct answer
join on operation_Id
Explanation
join combines rows from requests and exceptions that share the same operation_Id.
Question 8
Which KQL query returns the number of distinct users that called the API today?
- requests | where timestamp > startofday(now()) | summarize dcount(user_Id) — Correct
- requests | summarize sum(user_Id)
- requests | where timestamp > ago(1d) | summarize count() by user_Id
- requests | distinct timestamp
Correct answer
requests | where timestamp > startofday(now()) | summarize dcount(user_Id)
Explanation
dcount() returns the approximate number of distinct values.
Question 9
You want a custom span around the embedding generation step that records the model name and token count. What should you do?
- Add a metric alert
- Create a new Application Insights resource
- Write a log line with the model name and token count at the start of the step
- Start a span with tracer.start_as_current_span and set attributes on it — Correct
Correct answer
Start a span with tracer.start_as_current_span and set attributes on it
Explanation
Custom spans measure a unit of work, and attributes carry contextual data such as model name and tokens.
Question 10
Logs show a spike in latency for one service. You want to find which dependency in the trace contributed the most time. Where should you look?
- The Key Vault audit log
- The Container Apps revision list
- The end-to-end transaction details for a sample trace in Application Insights — Correct
- The Azure Activity log for the resource group, filtered to the slow service
Correct answer
The end-to-end transaction details for a sample trace in Application Insights
Explanation
End-to-end transaction views show each span's duration within the trace, so you can find the slow dependency.