# Azure monitor opentelemetry exporter java

> Azure monitor opentelemetry exporter java is an open-source agent skill for cloud and infrastructure. Guides Java code to export OpenTelemetry telemetry to Azure Monitor (deprecated package). It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java
- **Repository:** https://github.com/microsoft/skills
- **GitHub stars:** 3,214
- **License:** MIT
- **Skill name:** azure-monitor-opentelemetry-exporter-java
- **Collection:** https://github.com/microsoft/skills
- **Categories:** cloud and infrastructure
- **Listing updated:** 2026-11-18

## About

This skill gives the agent code patterns for sending OpenTelemetry traces, metrics and logs from Java applications to Azure Monitor and Application Insights. It shows how to initialize the OpenTelemetry SDK through the exporter's customize helper, using either the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable or an explicit connection string.

The guidance covers creating and nesting spans, adding attributes, recording exceptions, attaching a custom span processor, and emitting counters and histograms. It also flags that the exporter package is deprecated and points to the azure-monitor-opentelemetry-autoconfigure package and its migration guide as the replacement, including the Maven dependency swap.

The skill expects a Java project that uses Maven and the OpenTelemetry Java API and SDK, with an Application Insights resource and its connection string available.

## When your agent uses it

> Azure Monitor OpenTelemetry Exporter for Java. Export OpenTelemetry traces, metrics, and logs to Azure Monitor/Application Insights. Triggers: "AzureMonitorExporter java", "opentelemetry azure java", "application insights java otel", "azure monitor tracing java". Note: This package is DEPRECATED. Migrate to azure-monitor-opentelemetry-autoconfigure.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java)
- [License: MIT](https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java)

## Features

- **Connection string setup:** Shows how to initialize the OpenTelemetry SDK with an environment variable or explicit Application Insights connection string.
- **Trace span patterns:** Covers creating spans, nesting parent and child operations, and ending spans safely in finally blocks.
- **Exception recording:** Demonstrates recording exceptions and setting error status on failing spans.
- **Custom span processors:** Explains registering a span processor to add attributes to every span at start.
- **Metrics instrumentation:** Shows building counters and histograms with units and attributes through the OpenTelemetry meter API.
- **Migration guidance:** Notes the exporter is deprecated and outlines the switch to the autoconfigure package.

## Good for

- Add distributed tracing to a Java service that reports to Application Insights
- Create custom spans and attributes around business operations in Java code
- Record request counts and latency histograms from a Java application
- Migrate an existing Java OpenTelemetry exporter setup to the autoconfigure package

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/azure-monitor-opentelemetry-exporter-java` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/azure-monitor-opentelemetry-exporter-java &&
cp -R "$tmp/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java" ~/.claude/skills/azure-monitor-opentelemetry-exporter-java &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/azure-monitor-opentelemetry-exporter-java` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/azure-monitor-opentelemetry-exporter-java` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/azure-monitor-opentelemetry-exporter-java &&
cp -R "$tmp/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java" ~/.agents/skills/azure-monitor-opentelemetry-exporter-java &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/azure-monitor-opentelemetry-exporter-java` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/azure-monitor-opentelemetry-exporter-java` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/azure-monitor-opentelemetry-exporter-java &&
cp -R "$tmp/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java" ~/.cursor/skills/azure-monitor-opentelemetry-exporter-java &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/azure-monitor-opentelemetry-exporter-java` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/microsoft/skills.git --path .github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java
```

Or copy the folder to `~/.gemini/skills/azure-monitor-opentelemetry-exporter-java` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/azure-monitor-opentelemetry-exporter-java`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/azure-monitor-opentelemetry-exporter-java &&
cp -R "$tmp/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java" ~/.copilot/skills/azure-monitor-opentelemetry-exporter-java &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/azure-monitor-opentelemetry-exporter-java` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/microsoft/skills.git
```

Then copy `skills/.github/plugins/azure-sdk-java/skills/azure-monitor-opentelemetry-exporter-java` into your agent's skills folder as `azure-monitor-opentelemetry-exporter-java`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Is this exporter package still recommended?

No. The skill states the package is deprecated and recommends migrating to azure-monitor-opentelemetry-autoconfigure.

### What configuration does it need?

An Application Insights connection string, either set in the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable or passed explicitly to the customize method.

### Which telemetry types does it cover?

The skill covers traces and metrics with code examples; it describes the exporter as handling traces, metrics and logs.

### How do I install Azure monitor opentelemetry exporter java in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/azure-monitor-opentelemetry-exporter-java to use it in all your projects, or to .claude/skills/azure-monitor-opentelemetry-exporter-java in one project.

### Does Azure monitor opentelemetry exporter java run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Azure monitor opentelemetry exporter java?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Azure monitor opentelemetry exporter java?

The closest alternatives to Azure monitor opentelemetry exporter java are Gem devops guidelines, AWS cost optimize, AWS cdk python setup, Azure smart city iot solution builder and AWS resource health diagnose.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Gem devops guidelines](https://ai-powered.com/skills/gem-devops-guidelines): Gem devops guidelines is an open-source agent skill for cloud and infrastructure.
- [AWS cost optimize](https://ai-powered.com/skills/aws-cost-optimize): AWS cost optimize is an open-source agent skill for cloud and infrastructure.
- [AWS cdk python setup](https://ai-powered.com/skills/aws-cdk-python-setup): AWS cdk python setup is an open-source agent skill for cloud and infrastructure.
- [Azure smart city iot solution builder](https://ai-powered.com/skills/azure-smart-city-iot-solution-builder): Azure smart city iot solution builder is an open-source agent skill for cloud and infrastructure.
- [AWS resource health diagnose](https://ai-powered.com/skills/aws-resource-health-diagnose): AWS resource health diagnose is an open-source agent skill for cloud and infrastructure.
- [Azure static web apps](https://ai-powered.com/skills/azure-static-web-apps): Azure static web apps is an open-source agent skill for cloud and infrastructure.
- [Azure well architected review](https://ai-powered.com/skills/azure-well-architected-review): Azure well architected review is an open-source agent skill for cloud and infrastructure.
- [Azure resource health diagnose](https://ai-powered.com/skills/azure-resource-health-diagnose): Azure resource health diagnose is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/azure-monitor-opentelemetry-exporter-java
