Q19 Monitor Domain 4 · 20–25% of exam

A Python API should send traces, metrics and logs to Application Insights with the least setup code. What should you use?

  1. A The Azure Monitor OpenTelemetry Distro, calling configure_azure_monitor() (correct answer)
  2. B A hand-built TracerProvider, span processor and exporter
  3. C The legacy Application Insights SDK with an instrumentation key
  4. D Spans written to a log file and imported into Log Analytics

Shortcut: Python to Application Insights, fastest = configure_azure_monitor() from the OpenTelemetry Distro. Building the pipeline by hand works but takes more code, and the legacy SDK and instrumentation keys are being replaced by OpenTelemetry and connection strings.

The Distro (the azure-monitor-opentelemetry package) sets up OpenTelemetry tracing, metrics and logging plus the Azure Monitor exporters in one call, reading the APPLICATIONINSIGHTS_CONNECTION_STRING setting. Building the pipeline by hand works but takes more code, and the legacy SDK and instrumentation keys are being replaced by OpenTelemetry and connection strings.