7

I need to customize the way spring sleuth generates the trace id value: in my case the client sends a correlation id using a query param and I would like to use that value as trace id. Is that possible? How?

Thanks in advance.

Pirulino
  • 758
  • 1
  • 9
  • 20
  • Probably not, Sleuth is very specific about the format of it's traceId and spanId values. You can always manually set http headers X-B3-traceId and X-B3-spanId and then sleuth will not try to generate those itself, but there is no knowing that this will keep working correctly indefinitely. – Gimby Oct 08 '18 at 11:26
  • This [issue 1106 of spring-cloud-sleuth](https://github.com/spring-cloud/spring-cloud-sleuth/issues/1106) may give some news, good or bad. – Lebecca Feb 14 '20 at 08:12

0 Answers0