envoyproxy/envoy

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

Open

#39.412 geöffnet am 8. Mai 2025

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/tracingenhancementhelp wantedno stalebot

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

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