SKILL

azure-monitor-opentelemetry-py

Azure Monitor OpenTelemetry Distro for Python. Use for one-line Application Insights setup with auto-instrumentation. Triggers: "azure-monitor-opentelemetry", "configure_azure_monitor", "Application Insights", "OpenTelemetry distro", "auto-instrumentation".

Target: Cloud, operations & security. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • Azure Monitor OpenTelemetry Distro for Python
  • Installation
  • Environment Variables
  • Authentication & Lifecycle
  • Quick Start
  • Explicit Connection String
  • With Flask
  • With Django

One-line setup for Application Insights with OpenTelemetry auto-instrumentation. 🔑 Two rules apply to every code sample below: 1. Prefer DefaultAzureCredential for ingestion auth when supported. APPLICATIONINSIGHTSCONNECTIONSTRING identifies the target Application Insights resource, and credential=DefaultAzureCredential(...) provides Microsoft Entra authentication. - Local dev: DefaultAzureCredential works as-is. - Production: set AZURETOKENCREDENTIALS=prod (or AZURETOKENCREDENTIALS= ) to constrain the credential chain to production-safe credentials. 2. Providers are not context managers. Flush and shut down telemetry providers explicitly at process exit so buffers are exported deterministically. Snippets may abbreviate this setup, but production code should always follow both rules. Pass the connection string explicitly by reading it from the environment variable. The value includes both InstrumentationKey and IngestionEndpoint. Set cloud role name for Application Map: | Library | Telemetry Type | |---------|---------------| | Flask | Traces | | Django | Traces | | FastAPI | Traces | | Requests | Traces | | urllib3 | Traces | | httpx | Traces | | aiohttp | Traces | | psycopg2 | T

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
microsoft/skills
Source file
.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py/SKILL.md
Fixed revision
18e05b845d43e869b5701d796abce6e9a49e57db
Read the complete original documentation ↗

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: Microsoft Skills · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T00:00:24.396Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.