wallezhang edited a comment on issue #6730:
URL: https://github.com/apache/skywalking/issues/6730#issuecomment-818381991
> @wallezhang Seems the problem is related to passing the span across
threads. Have you tried to get the `ContextCarrier` from the properties of the
message?
>
> ```
> ContextCarrier carrier = new ContextCarrier();
> CarrierItem next = carrier.items();
> while (next.hasNext()) {
> next = next.next();
> next.setHeadValue(msg.getProperty(next.getHeadKey()));
> }
> ```
>
> Then you can use the carrier to create a span or other operations
>
> ```
> ContextManager.createEntrySpan(<operationName>, carrier);
> ```
Why not pass the span in the message across the thread? E.g. enhance the
`callMessageListener` method, which is already in the listener thread, so that
we can directly pass the span in the message
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]