Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Instrument your web apps with Azure Application Insights for telemetry and monitoring.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-monitor-opentelemetry-exporter-py.md
1# Azure Monitor OpenTelemetry Exporter — Python SDK Quick Reference23> Condensed from **azure-monitor-opentelemetry-exporter-py**. Full patterns4> (metric exporter, log exporter, offline storage, sovereign clouds)5> in the **azure-monitor-opentelemetry-exporter-py** plugin skill if installed.67## Install8```bash9pip install azure-monitor-opentelemetry-exporter10```1112## Quick Start13```python14from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter15exporter = AzureMonitorTraceExporter() # reads APPLICATIONINSIGHTS_CONNECTION_STRING16```1718## Best Practices19- Use BatchSpanProcessor for production (not SimpleSpanProcessor)20- Use ApplicationInsightsSampler for consistent sampling across services21- Enable offline storage for reliability in production22- Use AAD authentication instead of instrumentation keys23- Set export intervals appropriate for your workload24- Use the distro (azure-monitor-opentelemetry) unless you need custom pipelines25