-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can simplify it when we switch to instrumentation-api here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can simplify it when we switch to instrumentation-api here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't block it but want to point out that there seems to be quite a small span between 1.14 (8/2018) and 1.19 (1/2019) that having multiple instrumentation seems a bit overkill.
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.