azure-monitor-opentelemetry-exporter-py

Export OpenTelemetry traces, metrics, and logs from Python to Azure Monitor Application Insights.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-monitor-opentelemetry-exporter-py-davidrrowley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-monitor-opentelemetry-exporter-py
Source: https://github.com/davidrrowley/CortexYouV3/tree/main/.agents/skills/azure-monitor-opentelemetry-exporter-py
Command: npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-monitor-opentelemetry-exporter-py-davidrrowley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a low-level Python exporter to reliably send OpenTelemetry traces, metrics, and logs to Azure Monitor Application Insights, reducing the complexity of wiring SDK components and authentication for custom telemetry pipelines.

Core Features & Use Cases

  • Low-level exporters for traces, metrics, and logs via AzureMonitorTraceExporter, AzureMonitorMetricExporter, and AzureMonitorLogExporter.
  • Supports connection string and Azure AD credential authentication, BatchSpanProcessor for traces, PeriodicExportingMetricReader for metrics, and log record processors for logs.
  • Advanced options like ApplicationInsightsSampler for consistent sampling and optional offline storage for reliable retry during network outages.
  • Use Case: instrument a Python microservice with custom OpenTelemetry SDK configuration to batch and export telemetry to Application Insights while preserving sampling and retry semantics.

Quick Start

Install the package, set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable or provide a DefaultAzureCredential, and initialize the appropriate AzureMonitor exporter with BatchSpanProcessor or PeriodicExportingMetricReader in your Python application.

Frequently Asked Questions about azure-monitor-opentelemetry-exporter-py

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

FAQPage Schema
How do I export OpenTelemetry traces and metrics to Azure Monitor Application Insights in Python?

Initialize AzureMonitorTraceExporter or AzureMonitorMetricExporter and attach them to BatchSpanProcessor or PeriodicExportingMetricReader within your Python OpenTelemetry SDK pipeline to export telemetry to Azure Monitor.

What authentication methods are supported when sending OpenTelemetry telemetry to Azure Monitor?

Azure Monitor exporters support authentication via an APPLICATIONINSIGHTS_CONNECTION_STRING environment variable or by providing Azure AD credentials like DefaultAzureCredential for sending OpenTelemetry telemetry.

Can I use Azure AD authentication instead of a connection string for Application Insights exporters?

Yes, Azure Monitor exporters support Azure AD credential authentication as an alternative to the connection string for sending OpenTelemetry traces, metrics, and logs to Application Insights.

How do I handle offline retries when exporting OpenTelemetry logs to Azure Monitor?

You configure optional offline storage when setting up the AzureMonitorLogExporter to ensure reliable retry of OpenTelemetry logs during network outages when exporting to Azure Monitor.

How does the ApplicationInsightsSampler work with custom OpenTelemetry pipelines?

The ApplicationInsightsSampler provides consistent sampling within custom OpenTelemetry pipelines before traces are exported to Azure Monitor, maintaining sampling semantics across telemetry data.