azure-monitor-ingestion-java

Enables credential-based ingestion of batched logs into Azure Monitor for authenticated users.

2.9k|323|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/microsoft/skills --skill azure-monitor-ingestion-java-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-monitor-ingestion-java
Source: https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-monitor-ingestion-java
Command: npx skills add https://github.com/microsoft/skills --skill azure-monitor-ingestion-java-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The Azure Monitor Ingestion SDK for Java provides a complete client library to publish custom logs to Azure Monitor using the Logs Ingestion API via Data Collection Rules (DCR) and Data Collection Endpoints (DCE). This solves the burdens of writing boilerplate code to connect to ingestion endpoints, format logs, and handle authentication and batching.

Core Features & Use Cases

  • Client libraries for synchronous and asynchronous log ingestion to Azure Monitor using the Logs Ingestion API.
  • Demonstrates configuring DCE/DCR, endpoint setup, and credential handling with DefaultAzureCredential.
  • Real-world scenarios include uploading structured log entries from Java apps, batched uploads, and reactive streaming workflows.

Quick Start

Add the azure-monitor-ingestion dependency to your Java project and create a LogsIngestionClient to start sending logs to Azure Monitor.

Frequently Asked Questions about azure-monitor-ingestion-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send custom logs to Azure Monitor from a Java application?

You can send custom logs to Azure Monitor from Java by using the Logs Ingestion API via Data Collection Rules (DCR) and Data Collection Endpoints (DCE) to reliably upload structured log entries. The SDK handles batching, authentication, and endpoint configuration.

What is the difference between synchronous and asynchronous log ingestion in Azure Monitor?

Synchronous log ingestion blocks the Java application until the upload completes, while asynchronous ingestion allows reactive streaming workflows. Both use the Logs Ingestion API to send custom logs to Azure Monitor via configured DCR and DCE endpoints.

Do I need Data Collection Rules and Data Collection Endpoints to publish logs to Azure Monitor?

Yes, Data Collection Rules (DCR) and Data Collection Endpoints (DCE) are prerequisites for publishing logs. They define the target schema and ingestion endpoint, allowing the Java client to route custom log data correctly to Azure Monitor.

Can I use DefaultAzureCredential for authenticating log ingestion to Azure Monitor?

Yes, the Java Azure Monitor Ingestion client supports credential handling with DefaultAzureCredential. This allows you to authenticate log ingestion requests to your DCE securely without managing explicit secrets in your application code.

What is the best way to upload structured POJO-based logs to Azure Monitor?

The best way to upload structured POJO-based logs is using the Azure Monitor Ingestion SDK for Java. It provides client libraries that format and batch your objects automatically, sending them to Azure Monitor through configured Data Collection Rules.

How does batched log upload work with the Azure Monitor Logs Ingestion API?

Batched log upload groups multiple custom log entries into a single request sent to the Azure Monitor Logs Ingestion API. The Java SDK manages this batching internally to reduce overhead and improve throughput for DCR-based log publishing.