Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TraceId propagation to the new thread local #2608

Open
TJackler opened this issue Jan 31, 2024 · 5 comments
Open

TraceId propagation to the new thread local #2608

TJackler opened this issue Jan 31, 2024 · 5 comments

Comments

@TJackler
Copy link

TJackler commented Jan 31, 2024

The scenario and details are located here: micrometer-metrics/tracing#510 (comment)

Version: 3.1.1

@artembilan
Copy link
Member

From that description it sounds like the use-case is pretty complex, so would be great to have some simple project from you to play with.
Does it work well if you change that CompletableFuture<String> to just String?

@TJackler
Copy link
Author

TJackler commented Feb 1, 2024

Yes, it works correctly without CompletableFuture.

@artembilan
Copy link
Member

OK. So, then my request for a simple project is the next step what we can do over here.

@artembilan
Copy link
Member

According to the code there is no observation on sending a reply from the Rabbit listener method, so I'm failing to understand how it may work without a CompletableFuture.
Do you still think you would have a chance to share with us some project to let us reproduce?
Thanks

@JeremyTwiggs
Copy link

Hi, not sure if this will help, but in the past I used the overloaded CompletableFuture methods that take an Executor.

I create my executor like the following example:

ExecutorService executorService = new TraceableExecutorService(beanFactory, Executors.newFixedThreadPool(10));

then:

CompletableFuture.runAsync(() -> doStuff(), executorService)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants