Allow setting OpenTelemetry propagation type to B3
I want the ability to use B3 (Zipkin) propagation headers in the ingress-nginx OpenTelemetry implementation.
The upstream opentelemetry-cpp-contrib NGINX module supports two propagation types: W3C (default) and B3, configurable with the opentelemetry_propagate directive:
opentelemetry_propagate (W3C)
opentelemetry_propagate b3 (B3)
The current ingress-nginx implementation of the module hardcodes opentelemetry_propagate. We should expose a config option and potentially an ingress annotation that allows setting opentelemetry_propagate b3, perhaps in the simplest form as a boolean opentelemetry-propagate-b3: "true".
Especially considering v1.10 plans (#10186, #8687) to remove the OpenTracing implementation which does supports B3 (Zipkin) propagation.
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/assign
@esigo does it make sense to wait for https://github.com/open-telemetry/opentelemetry-cpp-contrib/pull/103 (looks like it's been revived recently), and go ahead and implement both B3 and B3-Multi in one go?
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.
I would like to revive this issue as now support for everything except OpenTelemetry is dropped and only having the hardcoded value of W3C propagation without the possibility to fallback to B3 and making Zipkin and older/custom integration unsuable. Please expose a way to configure B3/B3 propagation in config.
If you just want the B3 trace and span to propagate I have found that you can add the following in the location snippet. I don't know if it provides everything you want, but it seems sufficient for that purpose. I'd rather be able to do it 'properly' though.
proxy_set_header X-B3-TraceId "$opentelemetry_trace_id";
proxy_set_header X-B3-SpanId "$opentelemetry_span_id";
proxy_set_header X-B3-Sampled "0";
/remove-lifecycle frozen This repository is heading for archival; seee https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/