Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Instrument applications with Azure Application Insights for telemetry, tracing, and performance monitoring
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-monitor-opentelemetry-exporter-java.md
1# Azure Monitor OpenTelemetry Exporter — Java SDK Quick Reference23> Condensed from **azure-monitor-opentelemetry-exporter-java**. Full patterns4> (trace/metric/log export, spans, semantic conventions)5> in the **azure-monitor-opentelemetry-exporter-java** plugin skill if installed.67## Install8```xml9<dependency>10<groupId>com.azure</groupId>11<artifactId>azure-monitor-opentelemetry-exporter</artifactId>12<version>1.0.0-beta.x</version>13</dependency>14```1516> **DEPRECATED**: Migrate to `azure-monitor-opentelemetry-autoconfigure`.1718## Quick Start19```java20// Prefer autoconfigure instead:21// <artifactId>azure-monitor-opentelemetry-autoconfigure</artifactId>22```2324## Best Practices25- Use autoconfigure — migrate to `azure-monitor-opentelemetry-autoconfigure`26- Set meaningful span names — use descriptive operation names27- Add relevant attributes — include contextual data for debugging28- Handle exceptions — always record exceptions on spans29- Use semantic conventions — follow OpenTelemetry semantic conventions30- End spans in finally — ensure spans are always ended31- Use try-with-resources — scope management with try-with-resources pattern32