Is it possible to rename traceId and spanId to custom names
In the microservice system we have in production, we call our correlation-Id transactionId . We are planning to use spring-sleuth. Is it possible to rename traceId as transactionId?
What do you mean rename? Rename what exactly?
Can you please answer all the required questions described in the issue template? For your convenience let me paste it here
Describe the bug Please provide details of the problem, including the version of Spring Cloud that you are using.
Sample If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.
Spring-boot: 2.6.7 Spring-cloud-sleuth: 3.1.2
I see the traceId and spanId in the log as below which is not according to the standards we have in our organization. So my question is if it is possible to rename traceId in the log to something else.
(traceId=39713c83aa7a6bae, spanId=39713c83aa7a6bae)
To
(transactionId=39713c83aa7a6bae, spanId=39713c83aa7a6bae)
I have no idea who and how sets it in your logs. You can define the logging format in whatever way you please