envoyproxy / envoyproxy/envoy

Can envoy support both "B3" and "W3C" context propagation simultaneously?

Open
#39,412 5 comments 0 reactions 0 assignees View on GitHub
area/tracing enhancement help wanted no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

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:
1. 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
2. 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.