envoyproxy/envoy

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

Open

#39.412 aberto em 8 de mai. de 2025

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)C++ (5.373 forks)batch import
area/tracingenhancementhelp wantedno stalebot

Métricas do repositório

Stars
 (27.997 stars)
Métricas de merge de PR
 (Mesclagem média 8d) (378 fundiu PRs em 30d)

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?

Guia do colaborador