Dev & Engineering ✓ Microsoft · Official azure-monitorlog-analyticskusto-query-languagemetrics-queryjava-sdkmavenazure-authentication

Azure Monitor Query for Java

Query Azure Monitor logs and resource metrics from Java applications.

FollowSkills review · FSRS-2.0
Not recommended
52/ 100 5-point scale 2.6 / 5
Trust16 / 25 · 3.2/5

The documentation requires a TokenCredential and uses environment variables for workspace, resource, and credential configuration. The examples perform read-oriented queries, with no malicious behavior or destructive defaults observed. However, least-privilege RBAC guidance, sensitive-data handling, data-flow disclosure, user confirmation, auditing, and rollback are absent, so points are deducted.

Reliability8 / 20 · 2.0/5

It covers synchronous and asynchronous clients, logs, metrics, batch queries, and error handling, including failure-status checks. However, the package is explicitly deprecated, examples contain incomplete placeholders and missing imports, and some APIs appear inconsistent. No skill-specific reproducible tests are provided, so the score is limited by static evidence.

Adaptability9 / 15 · 3.0/5

The Java audience, trigger phrases, and logs/metrics scenarios are relatively clear, and China-cloud endpoints are included, supporting mainland-China environment fit. Non-fit boundaries are not defined, and the skill targets a deprecated package that should be replaced for new projects, so points are deducted.

Convention9 / 15 · 3.0/5

The skill has metadata, installation and prerequisite notes, structured sections, reference examples, error handling, MIT licensing, author and version metadata, and an explicit deprecation notice. It lacks a changelog, clear maintenance ownership or update path, and contains hidden assumptions and placeholders; the pinned version may also become stale.

Effectiveness6 / 15 · 2.0/5

The examples can directly help generate Java code for Azure Monitor Query clients, Kusto, logs, metrics, and batch queries, providing clear marginal value. However, the target package is deprecated, several examples need manual correction, and no executed validation or complete project template is supplied, so only limited credit is justified.

Verifiability4 / 10 · 2.0/5

The skill supplies references for the API, repository, migration, package, and troubleshooting material, together with versioned code examples. This review is static only; there are no skill-specific tests, CI coverage, or third-party execution artifacts establishing correctness of the key paths, so the score is limited.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 9ccaf7c3704a
Before you use it
  • This skill targets the deprecated azure-monitor-query package; new projects should prefer azure-monitor-query-logs and azure-monitor-query-metrics.
  • Examples contain placeholders, missing imports, and apparent result-status/API inconsistencies; compile-check them against the intended SDK version before use.
  • Least-privilege RBAC and sensitive-data handling for log queries are not specified; users should restrict credentials and query scope themselves.
  • No skill-specific execution or test evidence is supplied, so this review cannot confirm that the examples run.
See the full review method →

What it does & when to use it

This skill guides Java developers through the Azure Monitor Query SDK for querying Log Analytics with Kusto Query Language and retrieving metrics from Azure resources. It covers synchronous and asynchronous clients, batch log queries, multiple workspaces, metric aggregations, result mapping, and error handling. The referenced azure-monitor-query package is deprecated; new development should migrate to azure-monitor-query-logs and azure-monitor-query-metrics.

It shows how to add com.azure:azure-monitor-query:1.5.9 with Maven and create LogsQueryClient, LogsQueryAsyncClient, MetricsQueryClient, and MetricsQueryAsyncClient instances with TokenCredential. It runs workspace- or resource-scoped Kusto log queries, reads table rows, statistics, visualization data, and partial-failure states, and queries Azure resource metrics including time series, dimensions, and aggregate values. It also demonstrates batch queries, multiple workspaces and resources, timeouts, sovereign-cloud endpoints, custom model mapping, and exception handling.

  1. A Java Azure developer needs to run Kusto queries against a Log Analytics workspace and read activity-log results.
  2. A monitoring engineer needs Azure resource metric time series with dimensions, averages, totals, or counts.
  3. A team needs to submit several Log Analytics queries in one batch and inspect each result independently.
  4. A Java developer needs to map returned log rows into a custom application model.
  5. An application targeting Azure China Cloud needs example log and metric endpoint configuration.

Pros & cons

Pros
  • Covers both Azure Monitor logs and metrics queries.
  • Includes synchronous and asynchronous client examples.
  • Demonstrates batch queries, multiple workspaces, aggregations, statistics, visualization, and failure handling.
  • Provides Maven, DefaultAzureCredential, and sovereign-cloud configuration examples.
Limitations
  • The referenced `azure-monitor-query` package is deprecated, so new projects should migrate to two successor packages.
  • Users need a Log Analytics workspace or Azure resource and a properly authorized TokenCredential.
  • The source provides no independent test result or compatibility record for this specific skill.
  • The scope is limited to the Java Azure Monitor Query SDK, not other Azure services or languages.

How to install

Install the skill through the collection command npx skills add microsoft/skills, then select the required skill in the wizard. The README uses .github/skills/ as an example destination for GitHub Copilot. In the Java project, add Maven dependency com.azure:azure-monitor-query:1.5.9, or manage its version through the Azure SDK BOM.

How to use

Trigger the skill with phrases such as LogsQueryClient java, MetricsQueryClient java, kusto query java, log analytics java, or azure monitor query java. Provide a Log Analytics workspace or Azure resource and a TokenCredential with appropriate permissions; configure LOG_ANALYTICS_WORKSPACE_ID, AZURE_RESOURCE_ID, and, when using DefaultAzureCredential in production, AZURE_TOKEN_CREDENTIALS as needed. Because the package is deprecated, use the skill's migration guidance for new implementations.

Compared to similar skills

The source explicitly identifies azure-monitor-query-logs for Log Analytics queries and azure-monitor-query-metrics for metrics queries as the migration alternatives.

FAQ

Should I adopt this skill for a new project?
Use it mainly for maintaining existing code or understanding the deprecated package. New projects should use `azure-monitor-query-logs` and `azure-monitor-query-metrics` instead.
What access does it require?
You need a TokenCredential with appropriate permissions, plus a Log Analytics workspace for log queries or an Azure resource for metric queries. The source does not name specific role assignments.
How does it handle query failures?
Check for `PARTIAL_FAILURE` or failed batch results, and catch `HttpResponseException` to inspect the message and HTTP status code.
Does the source document runtime cost?
No. It identifies the repository and skill as MIT-licensed but provides no runtime pricing information.

More skills from this repository

All from microsoft/agent-skills

Dev & Engineering ✓ Microsoft · Official

Azure Identity for Python

A practical skill for securing Python Azure applications with Microsoft Entra ID credentials.

Dev & Engineering ✓ Microsoft · Official

Azure Event Hubs Java Skill

Build production-oriented Java event streaming applications on Azure Event Hubs.

Dev & Engineering ✓ Microsoft · Official

Azure Tables for Python

A practical guide to building authenticated Azure Tables applications with Python entity CRUD, queries, and partition-scoped batch operations.

Dev & Engineering ✓ Microsoft · Official

Azure Identity for TypeScript

Configure secure, flexible Microsoft Entra ID authentication for TypeScript Azure applications.

Automation & Ops ✓ Microsoft · Official

Azure Reliability Advisor

Assess and improve reliability for Azure Functions and App Service.

Dev & Engineering ✓ Microsoft · Official

Azure Cloud Architect

Guides coding agents through production-grade Azure architecture design and review using Azure Architecture Center practices.

Dev & Engineering ✓ Microsoft · Official

Azure AI Text Analytics for Python

Guides Python developers through Azure-powered text analysis and NLP workflows.

Automation & Ops ✓ Microsoft · Official

Azure Resource Architecture Visualizer

Analyze Azure resource groups and turn their dependencies into detailed Mermaid architecture diagrams.

Dev & Engineering ✓ Microsoft · Official

Azure Maps for .NET

Build .NET location features for search, routing, maps, geolocation, and weather.

Dev & Engineering ✓ Microsoft · Official

Azure AI Vision Image Analysis

Guides Python coding agents in implementing Azure AI Vision image understanding.

Dev & Engineering ✓ Microsoft · Official

Azure Blob Storage for Python

Guides secure, production-minded Blob Storage operations in Python.

Dev & Engineering ✓ Microsoft · Official

Azure Queue Storage for Python

Gives coding agents reliable Python patterns for secure Azure Queue Storage messaging and asynchronous task processing.

Automation & Ops ✓ Microsoft · Official

Azure AI Gateway Governance

Use Azure API Management to govern traffic across AI models, MCP tools, and agents.

Automation & Ops ✓ Microsoft · Official

AKS Automatic Readiness

Assess Kubernetes workloads for AKS Automatic compatibility and identify migration blockers before you switch.

Dev & Engineering ✓ Microsoft · Official

Azure Cosmos DB ARM for .NET

Provision and manage Azure Cosmos DB resources from .NET through ARM.

Dev & Engineering ✓ Microsoft · Official

Azure Playwright Workspace Manager

Provision and manage Microsoft Playwright Testing workspaces with .NET and Azure Resource Manager.

Dev & Engineering ✓ Microsoft · Official

Azure Cosmos DB for Python

A practical guide for building reliable Python applications on Azure Cosmos DB’s NoSQL API.

Dev & Engineering ✓ Microsoft · Official

Azure Key Vault SDK for Python

Gives Python coding agents practical guidance for securely managing Azure Key Vault secrets, keys, and certificates.

Dev & Engineering ✓ Microsoft · Official

Azure API Management for Python

Gives coding agents practical Python SDK patterns for managing Azure API Management services, APIs, products, subscriptions, and policies.

Dev & Engineering ✓ Microsoft · Official

Azure Monitor Query for Python

Generate Python code for querying Azure Monitor logs and metrics.

Related skills