thomas-gantenbein-tga commented on PR #16386:
URL: https://github.com/apache/camel/pull/16386#issuecomment-2504707909

   @squakez, I tried with 4.9.0-SNAPSHOT. I wouldn't say it's fixed, it's just 
... different. My reproducer goes as follows:
   
   ```java
    from("netty-http:http://0.0.0.0:12345";)
               .routeId("netty")
               .log("in netty route")
               .to("direct:aSlowerRoute")
               .to("direct:aFasterRoute");
   
           from("timer:mytimer?period=5000&repeatCount=2&synchronous=true")
               .routeId("timer")
               .log("in timer route")
               .to("direct:aSlowerRoute")
               .to("direct:aFasterRoute");
   
           from("direct:aSlowerRoute")
               .log("in aSlowerRoute")
               .delay(simple("${random(50, 350)}"))
               .log("still in aSlowerRoute");
   
           from("direct:aFasterRoute")
               .log("in aFasterRoute")
               .delay(simple("${random(10, 70)}"))
               .log("still in aFasterRoute");
   ```
   
   And here are the logs:
   # camel-springboot 4.8.1
   ## Timer, fire 1
   
   ```
   21:08:39.362 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[eca8ede291f7aacb9515ff3dd74f2ab0,ac054cb2298eff68] timer - in timer route
   21:08:39.372 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[eca8ede291f7aacb9515ff3dd74f2ab0,f35a35101a900e77] route1 - in aSlowerRoute
   21:08:39.598 INFO  Camel (camel-1) thread #3 - Delay 
[eca8ede291f7aacb9515ff3dd74f2ab0,916eba23ab488e92] route1 - still in 
aSlowerRoute
   21:08:39.601 INFO  Camel (camel-1) thread #3 - Delay 
[eca8ede291f7aacb9515ff3dd74f2ab0,d3604be1184bfe9c] route2 - in aFasterRoute
   21:08:39.657 INFO  Camel (camel-1) thread #4 - Delay 
[eca8ede291f7aacb9515ff3dd74f2ab0,0b938354295aa230] route2 - still in 
aFasterRoute
   ```
   
   ## Timer, fire 2
   ❌ traceId from fire 1
   ✔ thread #3 gets spanId from fire 1
   
   ```
   21:08:44.268 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[eca8ede291f7aacb9515ff3dd74f2ab0,0ef83f6235ee1b8e] timer - in timer route
   21:08:44.270 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[eca8ede291f7aacb9515ff3dd74f2ab0,ddf8b1f376f4017b] route1 - in aSlowerRoute
   21:08:44.456 INFO  Camel (camel-1) thread #3 - Delay 
[eca8ede291f7aacb9515ff3dd74f2ab0,d3604be1184bfe9c] route1 - still in 
aSlowerRoute
   21:08:44.458 INFO  Camel (camel-1) thread #3 - Delay 
[eca8ede291f7aacb9515ff3dd74f2ab0,55e33e194dbad337] route2 - in aFasterRoute
   21:08:44.472 INFO  Camel (camel-1) thread #4 - Delay 
[eca8ede291f7aacb9515ff3dd74f2ab0,ffc9bc53e60435b6] route2 - still in 
aFasterRoute
   ```
   
   # camel-springboot 4.9.0-SNAPSHOT
   ## Timer, fire 1
   ❌ traceId and spanId not propagated to thread #3 and #4
   
   ```
   20:51:23.689 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[a92b2cd46ea975b5f2065cb98ca98b8a,2ddffed3056dba31] timer - in timer route
   20:51:23.700 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[a92b2cd46ea975b5f2065cb98ca98b8a,3cc7c4c0b12fffab] route1 - in aSlowerRoute
   20:51:23.839 INFO  Camel (camel-1) thread #3 - Delay [,] route1 - still in 
aSlowerRoute
   20:51:23.842 INFO  Camel (camel-1) thread #3 - Delay 
[a92b2cd46ea975b5f2065cb98ca98b8a,c5d45ed0f340e491] route2 - in aFasterRoute
   20:51:23.876 INFO  Camel (camel-1) thread #4 - Delay [,] route2 - still in 
aFasterRoute
   ```
   
   ## Timer, fire 2
   ✔ New traceId generated
   ❌ traceId and spanId not propagated to thread #4
   ❌ thread #3 gets traceId and spanId from fire 1 before getting correct 
traceId and new spanId
   ❌ thread #4 does not get a traceId
   
   ```
   20:51:28.598 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[4d8bdc9683b6968898cd479b8259170a,e247c14e0a6280af] timer - in timer route
   20:51:28.600 INFO  Camel (camel-1) thread #2 - timer://mytimer 
[4d8bdc9683b6968898cd479b8259170a,0a160216be3f84e2] route1 - in aSlowerRoute
   20:51:28.696 INFO  Camel (camel-1) thread #3 - Delay 
[a92b2cd46ea975b5f2065cb98ca98b8a,c5d45ed0f340e491] route1 - still in 
aSlowerRoute
   20:51:28.698 INFO  Camel (camel-1) thread #3 - Delay 
[4d8bdc9683b6968898cd479b8259170a,6021d78f652666aa] route2 - in aFasterRoute
   20:51:28.726 INFO  Camel (camel-1) thread #4 - Delay [,] route2 - still in 
aFasterRoute
   ```
   
   ## curl, no traceparent header
   ✔ New traceId generated
   ✔ New traceId propagated to thread #4 and #8
   ❌ two times same spanId 18fa8a062cf5ce69
   
   ```
   20:51:58.911 INFO  Camel (camel-1) thread #8 - NettyConsumerExecutorGroup 
[f42e6647e9cac76b870f4b91dd63869e,591e5965005b199f] netty - in netty route
   20:51:58.913 INFO  Camel (camel-1) thread #8 - NettyConsumerExecutorGroup 
[f42e6647e9cac76b870f4b91dd63869e,cf69a2f758a9c90d] route1 - in aSlowerRoute
   20:51:59.077 INFO  Camel (camel-1) thread #5 - Delay 
[f42e6647e9cac76b870f4b91dd63869e,18fa8a062cf5ce69] route1 - still in 
aSlowerRoute
   20:51:59.079 INFO  Camel (camel-1) thread #5 - Delay 
[f42e6647e9cac76b870f4b91dd63869e,8d3c24f005b6e313] route2 - in aFasterRoute
   20:51:59.100 INFO  Camel (camel-1) thread #6 - Delay 
[f42e6647e9cac76b870f4b91dd63869e,18fa8a062cf5ce69] route2 - still in 
aFasterRoute
   ```
   
   ## curl, with traceparent header 4bf92f3577b34da6a3ce929d0e0e4739
   ✔ traceId taken from http header
   ✔ traceId propagated to thread #3 and #8
   ❌ thread #3 gets traceId and spanId from timer, fire 2
   
   ```
   20:52:17.908 INFO  Camel (camel-1) thread #12 - NettyConsumerExecutorGroup 
[4bf92f3577b34da6a3ce929d0e0e4739,f30adaa693cc553c] netty - in netty route
   20:52:17.909 INFO  Camel (camel-1) thread #12 - NettyConsumerExecutorGroup 
[4bf92f3577b34da6a3ce929d0e0e4739,8bb8773c982c307c] route1 - in aSlowerRoute
   20:52:18.205 INFO  Camel (camel-1) thread #3 - Delay 
[4d8bdc9683b6968898cd479b8259170a,6021d78f652666aa] route1 - still in 
aSlowerRoute
   20:52:18.207 INFO  Camel (camel-1) thread #3 - Delay 
[4bf92f3577b34da6a3ce929d0e0e4739,b1885430d753d182] route2 - in aFasterRoute
   20:52:18.255 INFO  Camel (camel-1) thread #4 - Delay 
[4bf92f3577b34da6a3ce929d0e0e4739,3afe751f39b1a76f] route2 - still in 
aFasterRoute
   ```
   
   ## curl, with traceparent header 4bf92f3577b34da6a3ce929d0e0e4740
   ✔ traceId taken from http header
   ❌ same spanId d916452083efcd5f 
   
   ```
   20:52:33.461 INFO  Camel (camel-1) thread #16 - NettyConsumerExecutorGroup 
[4bf92f3577b34da6a3ce929d0e0e4740,a15d1d4b16c0dcb0] netty - in netty route
   20:52:33.463 INFO  Camel (camel-1) thread #16 - NettyConsumerExecutorGroup 
[4bf92f3577b34da6a3ce929d0e0e4740,19edc06dcd19a524] route1 - in aSlowerRoute
   20:52:33.744 INFO  Camel (camel-1) thread #9 - Delay 
[4bf92f3577b34da6a3ce929d0e0e4740,d916452083efcd5f] route1 - still in 
aSlowerRoute
   20:52:33.745 INFO  Camel (camel-1) thread #9 - Delay 
[4bf92f3577b34da6a3ce929d0e0e4740,71800a5a37af3c69] route2 - in aFasterRoute
   20:52:33.779 INFO  Camel (camel-1) thread #10 - Delay 
[4bf92f3577b34da6a3ce929d0e0e4740,d916452083efcd5f] route2 - still in 
aFasterRoute
   ```
   
   ## curl, no traceparent header
   ✔ traceId taken from http header
   ❌ trace #5 gets traceId and spanId from curl, first call
   
   ```
   20:52:53.253 INFO  Camel (camel-1) thread #20 - NettyConsumerExecutorGroup 
[8ea524d7af24a239376e3f9a2058dc34,5b967ade2153d3ea] netty - in netty route
   20:52:53.254 INFO  Camel (camel-1) thread #20 - NettyConsumerExecutorGroup 
[8ea524d7af24a239376e3f9a2058dc34,3940e6071069658c] route1 - in aSlowerRoute
   20:52:53.455 INFO  Camel (camel-1) thread #5 - Delay 
[f42e6647e9cac76b870f4b91dd63869e,8d3c24f005b6e313] route1 - still in 
aSlowerRoute
   20:52:53.457 INFO  Camel (camel-1) thread #5 - Delay 
[8ea524d7af24a239376e3f9a2058dc34,5b7bbb88fc47ced8] route2 - in aFasterRoute
   20:52:53.475 INFO  Camel (camel-1) thread #6 - Delay 
[8ea524d7af24a239376e3f9a2058dc34,c63588f5683b94e2] route2 - still in 
aFasterRoute
   ```


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

Reply via email to