azure-monitor-opentelemetry-py

Enable Application Insights for Python apps via configure_azure_monitor().

2.9k|323|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/microsoft/skills --skill azure-monitor-opentelemetry-py-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-monitor-opentelemetry-py
Source: https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py
Command: npx skills add https://github.com/microsoft/skills --skill azure-monitor-opentelemetry-py-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Azure Monitor OpenTelemetry Distro for Python provides a simple, one-line setup to enable Application Insights instrumentation via OpenTelemetry auto-instrumentation.

Core Features & Use Cases

  • One-line setup to configure Application Insights instrumentation across Python apps.
  • Works with Flask, Django, and FastAPI to instrument web requests and traces.
  • Supports custom traces, metrics, and logs while allowing environment-based configuration.

Quick Start

Install the azure-monitor-opentelemetry package and call configure_azure_monitor() in your application to enable instrumentation.

Frequently Asked Questions about azure-monitor-opentelemetry-py

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable Application Insights monitoring for a Python app?

Application Insights monitoring for Python apps is enabled via a one-line setup using the OpenTelemetry configure_azure_monitor() function from the azure-monitor-opentelemetry package. This initializes auto-instrumentation to collect traces, metrics, and logs with minimal configuration.

Does Application Insights auto-instrumentation work with Flask, Django, and FastAPI?

Application Insights auto-instrumentation works seamlessly with Flask, Django, and FastAPI frameworks. The OpenTelemetry integration automatically instruments web requests and traces across these Python web frameworks without requiring manual trace handling.

What is OpenTelemetry auto-instrumentation for Python observability?

OpenTelemetry auto-instrumentation is a mechanism that automatically collects observability data such as traces, metrics, and logs from Python applications. It eliminates manual instrumentation code by automatically capturing telemetry from supported frameworks and libraries.

Can I configure Azure Monitor with environment variables instead of code changes?

Azure Monitor configuration supports environment-based setup for Application Insights instrumentation. You can use environment variables alongside the configure_azure_monitor() call to manage connection settings and optional instrumentations without hardcoding credentials directly in your Python application.

How do I send custom traces and metrics to Azure Monitor using OpenTelemetry?

Custom traces and metrics are sent to Azure Monitor through the OpenTelemetry API after initializing the configure_azure_monitor() function. This allows you to emit custom telemetry data alongside the automatically collected web request and logging data from your Python application.

How to set up Application Insights with optional credentials in Python?

Application Insights setup with optional credentials is handled by passing authentication parameters to the configure_azure_monitor() function. This initializes the OpenTelemetry instrumentation pipeline with the specified credentials, enabling secure telemetry data export to Azure Monitor.