valdar commented on pull request #4044:
URL: https://github.com/apache/camel/pull/4044#issuecomment-663762863


   Hi @jam01 thanks a lot for the effort and the quick response. I was 
reasoning about your assumptions/conditions:
   
   
   1.     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.
   2.     Only read headers for components that are not internal (seda, direct, 
vm, etc).
   3.     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.
   
   While I understand the principle behind, is the #2 really necessary? I have 
a real use-case coming from a camel subproject: camel-kafka-connectr where 
Kafka Connect api and camel are interfaced using exactly `direct` endpoints as 
the route starter. So the `uber-trace-id` is coming from the kafka message 
consumed by Kafka connect api and passed to camel-kafka-connector. Then 
camel-kafka-connector crafts an exchange coping the uber-trace-id in the proper 
header and finally sending it to the `direct` endpoint using a 
`producerTemplate`.
   
   At the end of the day if the exchange is initiated in another route it 
should already have an active span right?
   
   There would be another way to handle this and still comply to your 
conditions?
   


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