Why OpenTracing context doesn't flow into async activity / child workflow execution?

Hello,
I am testing open tracing integration with Temporal (java-sdk). Everything looks good except when I use async execution of activities or child workflows - in that case I get multiple, not related separate traces (with root spans for main WF and for each async invocation…).
It seems the reason is that when any outbound tracing interceptor executes (either for child WF or for activity), it relies on the fact that there’s the active parent span - which is null when activity is executed asynchronously (this is what I noticed during debugging) - quite expected when trace context is stored in thread local…
I configure interceptors for both worker & workflow client.
Do I miss any additional configuration or this is just not implemented / supported yet?..
Thanks!

Hi @Maxim_Chuvilyaev, can you please open an issue for this in our Java SDK? Adding a small reproducible that shows the issue you are running into would help a lot if possible as this indeed sounds like a possible bug.

Hi @tihomir ,
Thanks for you answer, I will open a ticket in java-sdk github. The setup that I have cannot be really used as a reproduction :wink: (real project, written in kotlin). TBH, I think that any WF that invokes a child WF or (at least 2) activities asynchronously should reproduce the issue.
But I will try to amend some existing tests in temporal-opentracing, and provide the code.

UPDATE: I reproduced the issue using existing tests in temporal-opentracing and created a new issue in github:

@Maxim_Chuvilyaev
Thank you for reporting the issue and for providing steps to reproduce!