'Spring-cloud-sleuth async methods

I have to add @Async annotation to method so Sleuth could generate span id and trace id. The problem is that it i need the same trace id as from the call side, but it is another.

main log: INFO [label-service,**a3a1f1db46aecf7a**,**a3a1f1db46aecf7a**]
async log: INFO [label-service,**b819bd0e67ee86c4**,b819bd0e67ee86c4]

I need ids in ** to be the same.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source