azure-sdk-for-java
azure-sdk-for-java copied to clipboard
Should azure core add InstrumentationPolicy by default whenever azure core httpclient is used
We have a customer who used azure core http client and tracing failed to work.
The workaround was to add HttpPolicyProviders.addAfterRetryPolicies(policies)
to their azure core HttpClient
instance.
Then it started working as expected.
public static void addAfterRetryPolicies(List<HttpPipelinePolicy> policies) {
policies.add(new InstrumentationPolicy());
addPolices(policies, AFTER_PROVIDER);
}
Should azure-core handled this automatically? or have a doc somewhere along with azure core HttpClient
emphasizing the fact that InstrumentationPolicy is mandatory in order for the instrumentation to work.