ffang commented on code in PR #16008: URL: https://github.com/apache/camel/pull/16008#discussion_r1810641358
########## components/camel-tracing/src/main/java/org/apache/camel/tracing/ActiveSpanManager.java: ########## @@ -56,6 +56,13 @@ public static SpanAdapter getSpan(Exchange exchange) { * @param span The span */ public static void activate(Exchange exchange, SpanAdapter span) { + if (exchange.getProperty(ExchangePropertyKey.CLOSE_CLIENT_SCOPE, Boolean.FALSE, Boolean.class)) { + //Check if we need to close the CLIENT scope created by + //DirectProducer in async mode before we create a new INTERNAL scope + //for the next DirectConsumer + endScope(exchange); + exchange.setProperty(ExchangePropertyKey.CLOSE_CLIENT_SCOPE, Boolean.FALSE); Review Comment: Hi @davsclaus , We run into this piece of code only when property ExchangePropertyKey.CLOSE_CLIENT_SCOPE is true, and we need to switch it as false to avoid doing endScope(exchange) again. Thanks for review! Freemna -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org