azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Should azure core add InstrumentationPolicy by default whenever azure core httpclient is used

Open heyams opened this issue 7 months ago • 3 comments

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.

heyams avatar Jul 10 '24 22:07 heyams