Skip to content

AddHttpClientInstrumentation is not using the baggage header in azure functions #1848

Closed
@Rick-van-Dam

Description

@Rick-van-Dam

Component

OpenTelemetry.Instrumentation.Http

Package Version

Package Name Version
OpenTelemetry.Instrumentation.Http 1.8.1
OpenTelemetry.Extensions.Hosting 1.8.1
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.8.1

Runtime Version

net8.0, azure functions

Description

When instrumenting httpclient in azure functions and adding baggage the request send by httpclient does not contain the baggage header. Instead the older Correlation-Context is being used.

Steps to Reproduce

  1. Instrument httpclient with .AddHttpClientInstrumentation
  2. Add baggage, for instance Activity.Current?.SetBaggage("foobar2", "fus43gf3g3");
  3. Do a http call using httpclient
  4. Notice the correlation-context header contain the baggage values and there is no baggage header

Expected Result

baggage header is used instead of the correlation-context header

Actual Result

correlation-context header is used

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp:instrumentation.httpThings related to OpenTelemetry.Instrumentation.Http

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions