beskow commented on PR #22677:
URL: https://github.com/apache/camel/pull/22677#issuecomment-4281457963

   > I think the correct way to handle this is to be able to create the Baggage 
the first time we are generating it:
   > 
   > 
https://github.com/apache/camel/blob/9ad5938acf1dedbf2d7bbad09d31f647de565e6e/components/camel-opentelemetry2/src/main/java/org/apache/camel/opentelemetry2/OpenTelemetryTracer.java#L101
   > 
   > - this likely means reviewing the telemetry abstraction and find a way to 
instruct it to add any baggage information, not necessarily programmatically 
(ie, it could be by adding some header).
   
   I'm afraid that also happens too early (ie. on exchange start):
   
   org.apache.camel.telemetry.Tracer.TracingRoutePolicy.onExchangeBegin(..) ->
   org.apache.camel.telemetry.Tracer.beginEventSpan(..) ->
   
org.apache.camel.opentelemetry2.OpenTelemetryTracer.OpentelemetrySpanLifecycleManager.create(..)
   
   We need access to the inbound message to extract the "business correlation 
id" that should be set as baggage. It would be ideal if I at that point (in a 
processor at the beginning of the route) could set a header with a map of 
baggageEntry=value pairs. But then I guess the creation of the baggage and 
baggageScope would have to be delayed somehow?
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to