Azure / Azure/azure-sdk-for-java

com.azure...util..DefaultTracerProvider looks for default tracer agents in case any exception occurs while calling any Azure core lib

Open
#42,861 5 comments 0 reactions 1 assignee Claimed by @rajkumar-rangaraj View on GitHub
bug customer-reported Monitor - Autoconfigure needs-team-attention OpenTelemetry
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 8h
Merged PRs (30d)
178

Description

### Type of issue

Other (describe below)

### Description

Issue: At the time of springboot application start, whenever there is an exception in any Azure core package (for example, `com.azure.security.*`), `com.azure.core.util.tracing.DefaultTracerProvider` looks for the default `DefaultTracerProvider`, which eventually looks for the Java class `io.opentelemetry.javaagent.instrumentation.opentelemetryapi.context.AgentContextStorage`.
My use case is to push the traces into azure app insight without using the applicationinsight java agent therefore i am creating my customise Opentelemetry and we don't want to use the applicationinsightjavagent jar file

So When this entire episode happens , it eventually call the AutoConfiguredOpenTelemetrySdk and set the default telemetry and tracer objects and which does not have any use.

**Library causing the issue:**

com.azure
azure-core-tracing-opentelemetry
1.0.0-beta.50

fyi- My use case is to push the traces into azure app insight without using the application-insight java agent therefore i am creating my customise Opentelemetry.

### Page URL

https://learn.microsoft.com/en-us/java/api/overview/azure/core-tracing-opentelemetry-readme?view=azure-java-preview

### Content source URL

https://github.com/Azure/azure-docs-sdk-java/blob/master/docs-ref-services/preview/core-tracing-opentelemetry-readme.md

### Document Version Independent Id

249ef132-a34b-8c4b-e6e5-ec5dffbe1a30

### Article author

@azure-sdk

### Metadata

* ID: 0d81d5b8-0d75-0082-cb01-dab0cf98d728
* Service: **core**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.