Skip to content
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

Propagate distributed tracing context in HTTP tracing policy #24008

Open
lmolkova opened this issue Jan 24, 2025 · 0 comments
Open

Propagate distributed tracing context in HTTP tracing policy #24008

lmolkova opened this issue Jan 24, 2025 · 0 comments
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. OpenTelemetry OpenTelemetry instrumentation (not Monitor-specific)

Comments

@lmolkova
Copy link
Member

lmolkova commented Jan 24, 2025

Distributed tracing policy does not propagate context in HTTP headers

https://github.com/Azure/azure-sdk-for-go/blob/799c8579d2d8f32d3f30457cd6da736be08d9c6b/sdk/azcore/runtime/policy_http_trace.go

(which should be done according to our common policy)

DO pass the context to the backend service through the appropriate headers (traceparent and tracestate per W3C Trace-Context standard)) to support Azure Monitor. This is generally done with the HTTP pipeline.

This is used by greenfield Azure services to correlate things.

Some notes/examples on how it can be done

  • OTel has implementation of W3C trace context propagator, here's the golang one
  • We just need to call propagator.inject similarly to this example

Note: Otel gives user an ability to customize propagator, we should ignore one configured by the user and use W3C trace context implementation since that's the standard - Azure services are not going to support custom propagation formats.

@lmolkova lmolkova added Azure.Core Client This issue points to a problem in the data-plane of the library. OpenTelemetry OpenTelemetry instrumentation (not Monitor-specific) labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. OpenTelemetry OpenTelemetry instrumentation (not Monitor-specific)
Projects
None yet
Development

No branches or pull requests

1 participant