Skip to content

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

@heyams

Description

@heyams

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azure.Coreazure-coreClientThis issue points to a problem in the data-plane of the library.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

    Type

    No type

    Projects

    Status

    Planned

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions