Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microsoft/azure-monitor-opentelemetry-py
Azure Monitor OpenTelemetry Distro for Python.
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
and 3 more in the full report
5 fixed17 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
I only want telemetry from 'requests' and 'psycopg2' libraries in my Python service, excluding all other auto-instrumented packages. How do I configure the Azure OpenTelemetry distro to only auto-instrument those two?
| Checked | Without skill | With skill |
|---|---|---|
| Passes instrumentations=['requests', 'psycopg2'] to configure_azure_monitor | Missed | Passed |
The instructions your model reads when the skill loads.
One-line setup for Application Insights with OpenTelemetry auto-instrumentation.
pip install azure-monitor-opentelemetry
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
🔑 Two rules apply to every code sample below:
- Prefer
DefaultAzureCredentialfor ingestion auth when supported.APPLICATIONINSIGHTS_CONNECTION_STRINGidentifies the target Application Insights resource, andcredential=DefaultAzureCredential(...)provides Microsoft Entra authentication.
- Local dev:
DefaultAzureCredentialworks as-is.- Production: set
AZURE_TOKEN_CREDENTIALS=prod(orAZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.- 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.
from azure.identity import DefaultAzureCredential
from azure.monitor.opentelemetry import configure_azure_monitor
# Connection string identifies the App Insights resource (read from APPLICATIONINSIGHTS_CONNECTION_STRING env var).
# DefaultAzureCredential authenticates ingestion via Microsoft Entra ID (preferred over instrumentation-key-only auth).
configure_azure_monitor(
credential=DefaultAzureCredential(),
)
test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.