Spring sleuth generate custom trace id
Asked Answered
T

0

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.

Taxis answered 8/10, 2018 at 10:57 Comment(2)
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.Tergal
This issue 1106 of spring-cloud-sleuth may give some news, good or bad.Agnosticism

© 2022 - 2025 — McMap. All rights reserved.