Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Azure Monitor OpenTelemetry Exporter for Java. Export OpenTelemetry traces, metrics, and logs to Azure Monitor/Application Insights.
.claude/skills/azure-monitor-opentelemetry-exporter-java/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
> ⚠️ DEPRECATION NOTICE: This package is deprecated. Migrate to azure-monitor-opentelemetry-autoconfigure. > > See Migration Guide for detailed instructions.
Export OpenTelemetry telemetry data to Azure Monitor / Application Insights.
xml<dependency> <groupId>com.azure</groupId> <artifactId>azure-monitor-opentelemetry-exporter</artifactId> <version>1.0.0-beta.x</version> </dependency>
xml<dependency> <groupId>com.azure</groupId> <artifactId>azure-monitor-opentelemetry-autoconfigure</artifactId> <version>LATEST</version> </dependency>
bashAPPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=xxx;IngestionEndpoint=https://xxx.in.applicationinsights.azure.com/
javaimport io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder; import io.opentelemetry.api.OpenTelemetry; import com.azure.monitor.opentelemetry.exporter.AzureMonitorExporter; // Connection string from APPLICATIONINSIGHTS_CONNECTION_STRING env var AutoConfiguredOpenTelemetrySdkBuilder sdkBuilder = AutoConfiguredOpenTelemetrySdk.builder(); AzureMonitorExporter.customize(sdkBuilder); OpenTelemetry openTelemetry = sdkBuilder.build().getOpenTelemetrySdk();
javaAutoConfiguredOpenTelemetrySdkBuilder sdkBuilder = AutoConfiguredOpenTelemetrySdk.builder(); AzureMonitorExporter.customize(sdkBuilder, "{connection-string}"); OpenTelemetry openTelemetry = sdkBuilder.build().getOpenTelemetrySdk();
javaimport io.opentelemetry.api.trace.Tracer; import io.opentelemetry.api.trace.Span; import io.opentelemetry.context.Scope; // Get tracer Tracer tracer = openTelemetry.getTracer("com.example.myapp"); // Create span Span span = tracer.spanBuilder("myOperation").startSpan(); try (Scope scope = span.makeCurrent()) { // Your application logic doWork(); } catch (Throwable t) { span.recordException(t); throw t; } finally { span.end(); }
javaimport io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; Span span = tracer.spanBuilder("processOrder") .setAttribute("order.id", "12345") .setAttribute("customer.tier", "premium") .startSpan(); try (Scope scope = span.makeCurrent()) { // Add attributes during execution span.setAttribute("items.count", 3); span.setAttribute("total.amount", 99.99); processOrder(); } finally { span.end(); }
javaimport io.opentelemetry.sdk.trace.SpanProcessor; import io.opentelemetry.sdk.trace.ReadWriteSpan; import io.opentelemetry.sdk.trace.ReadableSpan; import io.opentelemetry.context.Context; private static final AttributeKey<String> CUSTOM_ATTR = AttributeKey.stringKey("custom.attribute"); SpanProcessor customProcessor = new SpanProcessor() { @Override public void onStart(Context context, ReadWriteSpan span) { // Add custom attribute to every span span.setAttribute(CUSTOM_ATTR, "customValue"); } @Override public boolean isStartRequired() { return true; } @Override public void onEnd(ReadableSpan span) { // Post-processing if needed } @Override public boolean isEndRequired() { return false; } }; // Register processor AutoConfiguredOpenTelemetrySdkBuilder sdkBuilder = AutoConfiguredOpenTelemetrySdk.builder(); AzureMonitorExporter.customize(sdkBuilder); sdkBuilder.addTracerProviderCustomizer( (sdkTracerProviderBuilder, configProperties) -> sdkTracerProviderBuilder.addSpanProcessor(customProcessor) ); OpenTelemetry openTelemetry = sdkBuilder.build().getOpenTelemetrySdk();
javapublic void parentOperation() { Span parentSpan = tracer.spanBuilder("parentOperation").startSpan(); try (Scope scope = parentSpan.makeCurrent()) { childOperation(); } finally { parentSpan.end(); } } public void childOperation() { // Automatically links to parent via Context Span childSpan = tracer.spanBuilder("childOperation").startSpan(); try (Scope scope = childSpan.makeCurrent()) { // Child work } finally { childSpan.end(); } }
javaSpan span = tracer.spanBuilder("riskyOperation").startSpan(); try (Scope scope = span.makeCurrent()) { performRiskyWork(); } catch (Exception e) { span.recordException(e); span.setStatus(StatusCode.ERROR, e.getMessage()); throw e; } finally { span.end(); }
javaimport io.opentelemetry.api.metrics.Meter; import io.opentelemetry.api.metrics.LongCounter; import io.opentelemetry.api.metrics.LongHistogram; Meter meter = openTelemetry.getMeter("com.example.myapp"); // Counter LongCounter requestCounter = meter.counterBuilder("http.requests") .setDescription("Total HTTP requests") .setUnit("requests") .build(); requestCounter.add(1, Attributes.of( AttributeKey.stringKey("http.method"), "GET", AttributeKey.longKey("http.status_code"), 200L )); // Histogram LongHistogram latencyHistogram = meter.histogramBuilder("http.latency") .setDescription("Request latency") .setUnit("ms") .ofLongs() .build(); latencyHistogram.record(150, Attributes.of( AttributeKey.stringKey("http.route"), "/api/users" ));
| Concept | Description | |---------|-------------| | Connection String | Application Insights connection string with instrumentation key | | Tracer | Creates spans for distributed tracing | | Span | Represents a unit of work with timing and attributes | | SpanProcessor | Intercepts span lifecycle for customization | | Exporter | Sends telemetry to Azure Monitor |
The azure-monitor-opentelemetry-autoconfigure package provides:
xml <!-- Remove --> <dependency> <groupId>com.azure</groupId> <artifactId>azure-monitor-opentelemetry-exporter</artifactId> </dependency>
<!-- Add --> <dependency> <groupId>com.azure</groupId> <artifactId>azure-monitor-opentelemetry-autoconfigure</artifactId> </dependency>
azure-monitor-opentelemetry-autoconfigure| Resource | URL | |----------|-----| | Maven Package | https://central.sonatype.com/artifact/com.azure/azure-monitor-opentelemetry-exporter | | GitHub | https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter | | Migration Guide | https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/MIGRATION.md | | Autoconfigure Package | https://central.sonatype.com/artifact/com.azure/azure-monitor-opentelemetry-autoconfigure | | OpenTelemetry Java | https://opentelemetry.io/docs/languages/java/ | | Application Insights | https://learn.microsoft.com/azure/azure-monitor/app/app-insights-overview |
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +23 percentage points is the difference between those two pass rates over the 21 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.