[ https://issues.apache.org/jira/browse/CAMEL-21302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17891799#comment-17891799 ]
Claus Ibsen commented on CAMEL-21302: ------------------------------------- Are you sure it really works, I see DEBUG errors when running AsyncCxfTest in the log if I enable this via +logger.otel.name=org.apache.camel.tracing +logger.otel.level=TRACE > camel-opentelemetry context leak with direct async producer > ----------------------------------------------------------- > > Key: CAMEL-21302 > URL: https://issues.apache.org/jira/browse/CAMEL-21302 > Project: Camel > Issue Type: Bug > Components: camel-opentelemetry > Reporter: John Poth > Assignee: Freeman Yue Fang > Priority: Major > Fix For: 4.9.0 > > > There seems to be a Otel context leak when using a CXF producer in async > mode. This causes different requests to have the same _traceId._ As a > workaround, setting _synchronous=true_ on the CXF producer resolves the > issue. Here's a reproducer: > {code:java} > @Override > protected RoutesBuilder createRouteBuilder() { > return new RouteBuilder() { > @Override > public void configure() { > from("direct:start").routeId("myRoute") > .to("direct:send") > .end(); > from("direct:send") > .log("message") > .to("cxfrs:http://localhost:" + port1 > + "/rest/helloservice/sayHello?synchronous=false"); > // setting to 'true' resolves the issue > restConfiguration() > .port(port1); > rest("/rest/helloservice") > .post("/sayHello").routeId("rest-GET-say-hi") > .to("direct:sayHi"); > from("direct:sayHi") > .routeId("mock-GET-say-hi") > .log("example") > .to("mock:end"); > }}; > {code} > > I've added the complete unit here: > https://github.com/apache/camel/blob/7d83a62b8e442dc9ac6fd79b153192add940301e/components/camel-opentelemetry/src/test/java/org/apache/camel/opentelemetry/AsyncCxfTest.java -- This message was sent by Atlassian Jira (v8.20.10#820010)