codelipenghui commented on issue #6730:
URL: https://github.com/apache/skywalking/issues/6730#issuecomment-817768403


   @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);
   ```


-- 
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]


Reply via email to