How to change trace-id header in opentracing?
Asked Answered
C

1

8

Is there way to configure opentracing-spring-jaeger-cloud-starter to handle any other header than Uber-Trace-Id? I have Traefik as an ingress in my kubernetes cluster. Traefik can be configured to change traceContextHeaderName. Default value is "uber-trace-id". When I change it to some custom, there is no connection (I mean span connection) between services. I believe that opentracing works only with Uber-Trace-Id. Is there way to configure that?

I test this in minikube with Traefik as an ingress. Then all requests go to spring-cloud-gateway and are propagate to services.

Thanks for help!

Cutoff answered 3/7, 2019 at 5:50 Comment(0)
O
2

No, there is no out-of-the-box possibility to change the HTTP header name. However, you can enable B3 header propagation with opentracing.jaeger.enable-b3-propagation=true. To configure Traefik to send the trace data as B3 headers, see https://github.com/containous/traefik/blob/master/docs/content/observability/tracing/jaeger.md#propagation. traceContextHeaderName should also be configured as X-B3-TraceId then.

Ostracon answered 8/7, 2019 at 19:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.