envoyproxy/envoy

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

Open

#39,412 创建于 2025年5月8日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)C++ (5,373 fork)batch import
area/tracingenhancementhelp wantedno stalebot

仓库指标

Star
 (27,997 star)
PR 合并指标
 (平均合并 8天) (30 天内合并 378 个 PR)

描述

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?

贡献者指南