Can envoy support both "B3" and "W3C" context propagation simultaneously?
#39 412 ouverte le 8 mai 2025
Métriques du dépôt
- Stars
- (27 997 stars)
- Métriques de merge PR
- (Merge moyen 8j) (378 PRs mergées en 30 j)
Description
Title: One line description
Description:
Describe the desired behavior, what scenario it enables and how it would be used.
We are using open-telemetry to instrument our applications. And otel support both B3 and W3C propagation. When a request was sent from our application, it contains the same trace content(Trace id, span id, sampled, etc) in 2 different format(W3C and B3). See the sample request header below.
'traceparent', '00-35ac4cac9cf6ecae0185066ff3ac34ff-0aff11de378edcd3-00' 'x-b3-traceid', '35ac4cac9cf6ecae0185066ff3ac34ff' 'x-b3-spanid', '0aff11de378edcd3' 'x-b3-sampled', '0'
We are using envoy proxy to gate our incoming/outgoing request.
As far as I know there are 2 options:
- use zipkin(https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/zipkin.proto#extension-envoy-tracers-zipkin) provider which support only b3
- use open-telemetry(https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/opentelemetry.proto#extension-envoy-tracers-opentelemetry) provider which support only w3c
The problem is, we might be calling a application which is accepting either W3C or B3 format. And there is also a chance that some other service only sends either W3C or B3 header to our application. Could we let envoy support both B3 and W3C simultaneously?