Azure Monitor Log Ingestion for Java
Guides Java applications in sending structured custom logs to Azure Monitor through DCRs.
The documentation identifies the DCE, DCR, workspace, and credential environment variables, and shows DefaultAzureCredential and managed identity usage. However, uploading logs is an explicit external data flow, while sensitive-log redaction, least-privilege RBAC, user confirmation, idempotency, and rollback are not addressed, so trust is materially deducted.
Synchronous, asynchronous, concurrent, and partial-failure patterns are documented, with some HTTP-status diagnostics. Static evidence provides no executed reproduction for the key paths; dependency examples are inconsistent (1.2.11, 1.2.14, and BOM 1.2.29), and input limits, batching edges, and retry behavior are incomplete. The score is therefore constrained by static calibration and further reduced.
Triggers, Java SDK scope, prerequisites, and common scenarios are reasonably clear. Non-fit cases, schema and payload limits, and authentication boundaries are not sufficiently specified; there is no evidence of Chinese-language support or reachability of the Azure service path from mainland-China networks, so adaptability is deducted.
The material is well organized across installation, prerequisites, environment variables, synchronous/asynchronous examples, error handling, best practices, and a reference examples file. However, versions are inconsistent, and changelog, explicit maintenance ownership, update path, FAQ, post-install verification, and known limitations are missing. MIT licensing is visible in metadata and the repository license, but this is not complete governance documentation.
The skill can directly guide common Java log uploads, concurrency configuration, and partial-failure handling, with code that is potentially reusable after review. It does not fully cover production schema validation, service batching limits, retry/deduplication, privacy controls, or deployment concerns, and some examples require manual correctness checking, so effectiveness is capped and deducted.
The skill includes Maven, GitHub, product-documentation, and troubleshooting references, and the repository shows general CI and test infrastructure. Those files do not demonstrate executed validation of this skill's key examples, however; no skill-specific committed tests or third-party execution evidence are supplied, so verifiability remains limited.
- Logs may contain sensitive data; production use requires validating classification, redaction, DCR schema, network boundaries, and least-privilege RBAC.
- SDK and BOM versions differ between the main skill and reference file; examples should be checked against a pinned official version and actual API signatures.
- The material does not establish mainland-China network reachability, regional service availability, or private-network configuration; deployment must be validated separately.
- The asynchronous examples use subscribe without documenting lifecycle management, backpressure, retries, duplicate uploads, or durable handling of failed logs.
What it does & when to use it
This skill is for Java developers using the Azure Monitor Ingestion SDK. It covers the Azure resources required for ingestion, client construction with token credentials, and synchronous or reactive asynchronous uploads. It includes batching, concurrency, partial-failure handling, log-entry serialization, and common HTTP error responses. Adopt it when a Java application needs to write custom logs to Azure Monitor and the required DCE, DCR, workspace, table, and permissions are available.
Provides Maven dependency examples and Java patterns for creating LogsIngestionClient or LogsIngestionAsyncClient; shows how to call upload with a DCR ID and stream name; demonstrates maxConcurrency for larger collections and an error consumer for failed entries; documents getter requirements for JSON serialization, DCR schema matching, and TimeGenerated; explains basic handling for 403 and 404 responses and points to the azure-monitor-query skill for querying ingested logs.
- A Java backend developer needs to send application-specific events into a Log Analytics workspace.
- A platform team has configured a DCE and DCR and needs a pattern for uploading structured logs in batches.
- An ingestion pipeline handles large collections and needs synchronous concurrency or reactive asynchronous uploads.
- An operator wants to capture failed log entries and continue processing instead of aborting every upload.
Pros & cons
- Covers both synchronous and Reactor-based asynchronous clients.
- Includes concurrency, partial-upload error callbacks, and common HTTP error handling.
- Clearly identifies DCE, DCR, stream, schema, and timestamp prerequisites.
- Supplies dependency coordinates, environment variables, and reference links.
- It does not configure the Azure resources or permissions for you.
- The provided SKILL.md contains no standalone test suite or Java-specific acceptance scenarios.
- The source pins version 1.2.11 but does not establish that it is current.
- Log querying is delegated to another skill rather than covered in depth here.
How to install
Install the collection with npx skills add microsoft/skills, then select the required skill in the wizard. The README says skills are installed into the selected agent directory, such as .github/skills/ for GitHub Copilot; the source does not document a standalone installation command for this Java skill. Add the Maven dependency com.azure:azure-monitor-ingestion:1.2.11, or manage its version with the Azure SDK BOM.
How to use
After installation, prompt the coding Agent with a trigger such as “Show me how to use LogsIngestionClient java” or “upload custom logs to Azure Monitor with DCR java”. Prepare a Data Collection Endpoint, Data Collection Rule, Log Analytics workspace, and target table. Set DATA_COLLECTION_ENDPOINT, DATA_COLLECTION_RULE_ID, and STREAM_NAME; when using DefaultAzureCredential in production, also set AZURE_TOKEN_CREDENTIALS=prod.