azure-monitor-opentelemetry-py
Installation
SKILL.md
Azure Monitor OpenTelemetry Distro for Python
One-line setup for Application Insights with OpenTelemetry auto-instrumentation.
Installation
pip install azure-monitor-opentelemetry
Environment Variables
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=xxx;IngestionEndpoint=https://xxx.in.applicationinsights.azure.com/ # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
🔑 Auth & lifecycle: This distro is configured with a connection string by design, but for AAD-authenticated ingestion (where supported) prefer
DefaultAzureCredentialvia thecredential=parameter — see the Azure AD Authentication section. Any Azure SDK clients you create alongside the exporter should be wrapped inwith/async withblocks (and async credentials fromazure.identity.aiolikewise).