Add Azure SDK instrumentation - #5467
Conversation
| // we cannot use com.azure.core.http.policy.AfterRetryPolicyProvider | ||
| // or com.azure.core.util.tracing.Tracer here because we inject classes that implement these | ||
| // interfaces, causing the first one of these interfaces to be transformed to cause itself to | ||
| // be loaded (again), which leads to duplicate class definition error after the interface is | ||
| // transformed and the triggering class loader tries to load it. | ||
| // | ||
| // this is a list of all classes that call one of these: | ||
| // * ServiceLoader.load(AfterRetryPolicyProvider.class) | ||
| // * ServiceLoader.load(Tracer.class) | ||
| return named("com.azure.core.http.policy.HttpPolicyProviders") | ||
| .or(named("com.azure.core.util.tracing.TracerProxy")) | ||
| .or(named("com.azure.cosmos.CosmosAsyncClient")) | ||
| .or(named("com.azure.messaging.eventhubs.EventHubClientBuilder")) | ||
| .or(named("com.azure.messaging.eventhubs.EventProcessorClientBuilder")) | ||
| .or(named("com.azure.messaging.servicebus.ServiceBusClientBuilder")); |
There was a problem hiding this comment.
I guess we can simplify it when we switch to instrumentation-api here
lmolkova
left a comment
There was a problem hiding this comment.
As per offline discussion, we should keep suppression in 1.19 version. Otherwise looks great!
| // we cannot use com.azure.core.http.policy.AfterRetryPolicyProvider | ||
| // or com.azure.core.util.tracing.Tracer here because we inject classes that implement these | ||
| // interfaces, causing the first one of these interfaces to be transformed to cause itself to | ||
| // be loaded (again), which leads to duplicate class definition error after the interface is | ||
| // transformed and the triggering class loader tries to load it. | ||
| // | ||
| // this is a list of all classes that call one of these: | ||
| // * ServiceLoader.load(AfterRetryPolicyProvider.class) | ||
| // * ServiceLoader.load(Tracer.class) | ||
| return named("com.azure.core.http.policy.HttpPolicyProviders") | ||
| .or(named("com.azure.core.util.tracing.TracerProxy")) | ||
| .or(named("com.azure.cosmos.CosmosAsyncClient")) | ||
| .or(named("com.azure.messaging.eventhubs.EventHubClientBuilder")) | ||
| .or(named("com.azure.messaging.eventhubs.EventProcessorClientBuilder")) | ||
| .or(named("com.azure.messaging.servicebus.ServiceBusClientBuilder")); |
There was a problem hiding this comment.
I guess we can simplify it when we switch to instrumentation-api here
those dates don't look right to me: https://search.maven.org/artifact/com.azure/azure-core |
|
Hmm, I got it from mvnrepository.com which surprisingly is more accurate it seems https://mvnrepository.com/artifact/com.microsoft.azure/azure/1.14.0 |
|
oh, you're looking at the wrong groupId/artifactId |
|
Oops that explains it. So I guess 1.14 being less than a year old, so pretty new, is motivation to instrument it that seems reasonable. |
|
Ooops, I forgot was going to convert tests to Java, will send separate PR. |
* Add Azure SDK instrumentation * Add to supported libraries table * Keep suppression for 1.19
No description provided.