azure-monitor-ingestion-py
Azure Monitor Ingestion SDK for Python. Use for sending custom logs to Log Analytics workspace via Logs Ingestion API. Triggers: "azure-monitor-ingestion", "LogsIngestionClient", "custom logs", "DCR", "data collection rule", "Log Analytics".
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 Ingestion SDK for Python
- Installation
- Environment Variables
- Prerequisites
- Authentication & Lifecycle
- Upload Custom Logs
- Upload from JSON File
- Custom Error Handling
Send custom logs to Azure Monitor Log Analytics workspace using the Logs Ingestion API. Before using this SDK, you need: 1. Log Analytics Workspace — Target for your logs 2. Data Collection Endpoint (DCE) — Ingestion endpoint 3. Data Collection Rule (DCR) — Defines schema and destination 4. Custom Table — In Log Analytics (created via DCR or manually) 🔑 Two rules apply to every code sample below: 1. Prefer DefaultAzureCredential. It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation. - Local dev: DefaultAzureCredential works as-is. - Production: set AZURETOKENCREDENTIALS=prod (or AZURETOKENCREDENTIALS= ) to constrain the credential chain to production-safe credentials. 2. Wrap every client in a context manager so HTTP transports, sockets, and token caches are released deterministically: - Sync: with (...) as client: - Async: async with (...) as client: and async with DefaultAzureCredential() as credential: (from azure.identity.aio) Snippets may abbreviate this setup, but production code should always follow both rules. Handle pa
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-ingestion-py/SKILL.md
- Fixed revision
- 9287b443662d2433c85621c7325ee72a0ce499b5
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-10T19:02:06.406Z.
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.