azure-monitor-opentelemetry-py

Solid

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".

DevOps & Infrastructure 2,541 stars 295 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Azure Monitor OpenTelemetry Distro for Python One-line setup for Application Insights with OpenTelemetry auto-instrumentation. ## Installation ```bash pip install azure-monitor-opentelemetry ``` ## Environment Variables ```bash APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=xxx;IngestionEndpoint=https://xxx.in.applicationinsights.azure.com/ ``` ## Quick Start ```python from azure.monitor.opentelemetry import configure_azure_monitor # One-line setup - reads connection string from environment configure_azure_monitor() # Your application code... ``` ## Explicit Configuration ```python from azure.monitor.opentelemetry import configure_azure_monitor configure_azure_monitor( connection_string="InstrumentationKey=xxx;IngestionEndpoint=https://xxx.in.applicationinsights.azure.com/" ) ``` ## With Flask ```python from flask import Flask from azure.monitor.opentelemetry import configure_azure_monitor configure_azure_monitor() app = Flask(__name__) @app.route("/") def hello(): return "Hello, World!" if __name__ == "__main__": app.run() ``` ## With Django ```python # settings.py from azure.monitor.opentelemetry import configure_azure_monitor configure_azure_monitor() # Django settings... ``` ## With FastAPI ```python from fastapi import FastAPI from azure.monitor.opentelemetry import configure_azure_monitor configure_azure_monitor() app = FastAPI() @app.get("/") async def root(): return {"message": "Hello World"} ``` ## Custom Traces...

Details

Author
microsoft
Repository
microsoft/skills
Created
4 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category