jam01 commented on pull request #4001:
URL: https://github.com/apache/camel/pull/4001#issuecomment-663661171


   You're absolutely right! So that specific change was meant to accommodate a 
scenario where when using javaagent instrumentation you let the HTTP/JMS/etc 
library specific instrumentation create and decorate spans, possibly in a more 
deterministic manner than camel generic ones can. It seems there was no 
coverage for a scenario where you want camel to still give it a shot looking in 
the incoming headers. I missed that!
   
   That said, we have to think about some conditionals. 
   * Camel should only attempt to read from the incoming headers when there's 
not already an active span for that exchange. This is in case instrumentation 
already extracted the parent from the headers. Activating the span for the 
exchange in instrumentation is the part I'm still working on.
   * Only read headers for components that are not internal (seda, direct, vm, 
etc). 
   * Only add the Server tag when.... the component is not internal and no span 
is active for the exchange. Whether we found a parent in the headers or not.
   
   I think this should cover it... I'll add some tests and confirm. Thanks for 
bringing this up, sorry if this set you back some! Expect a PR soonish...


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to