0

As part of our spring application, we are using Spring Sleuth to inject traceid & spanid into the requests. This neatly works with SL4J via MDC integration to propagate to the logs as well.

But running into issues with our organization not using B3 headers that Sleuth is tightly coupled with. So looking at alternatives for using custom request header like "x-trace-id" that could be injected into the traces.

Our traceability is still via centralized logging like splunk. We do not yet have a centralized collector like zipkin & hence sampling is not relevant yet. So the immediate usecase is to ensure log traceability and once we have a central collector for tracing, hoping sampling is available out of the box to use.

Srini M
  • 196
  • 3
  • 16
  • Your description is little confusing as to what you want achieve? Do you want inject trace info into http headers other than B3 format? – Srikanth Chekuri Oct 21 '21 at 03:18

1 Answers1

0

Sleuth is not tightly coupled with B3, it supports AWS, B3, W3C, and custom (B3 is the default): see the docs about Context Propagation

You can change the context propagation mechanism, see docs: How to Change The Context Propagation Mechanism?

Jonatan Ivanov
  • 4,895
  • 2
  • 15
  • 30