[ 
https://issues.apache.org/jira/browse/CAMEL-21472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903339#comment-17903339
 ] 

Pasquale Congiusti commented on CAMEL-21472:
--------------------------------------------

Quick heads up on this issue. I am making progresses, though, I don't have yet 
the complete solution as certain tests are failing. This is what I got so far 
(I've included the wiretap to simulate a real async call interleaved in the 
process):

{code}
12:26:36.036 [5f7c87408ab2e29dd5e736ec742f62b4, 52a7e016f8afbae7] in timer route
12:26:36.044 [5f7c87408ab2e29dd5e736ec742f62b4, b64517a3ecde8117] in 
aSlowerRoute
12:26:37.046 [5f7c87408ab2e29dd5e736ec742f62b4, b64517a3ecde8117] still in 
aSlowerRoute
12:26:37.048 [5f7c87408ab2e29dd5e736ec742f62b4, cb4d3e47274def0b] in 
aFasterRoute
12:26:37.549 [5f7c87408ab2e29dd5e736ec742f62b4, cb4d3e47274def0b] still in 
aFasterRoute

12:26:46.005 [bbe4122e503a3f9dfdc3806f0e3ea2af, a645119e2f5db80c] in timer route
12:26:46.007 [bbe4122e503a3f9dfdc3806f0e3ea2af, cb87f425ad3ca37a] in 
aSlowerRoute
12:26:47.009 [bbe4122e503a3f9dfdc3806f0e3ea2af, cb87f425ad3ca37a] still in 
aSlowerRoute
12:26:47.012 [bbe4122e503a3f9dfdc3806f0e3ea2af, 29ba3f5768fc64ab] in 
aFasterRoute
12:26:47.049 [5f7c87408ab2e29dd5e736ec742f62b4, 3646aa00eebee873] 
Exchange[ExchangePattern: InOnly, BodyType: String, Body: Tapped]
12:26:47.513 [bbe4122e503a3f9dfdc3806f0e3ea2af, 29ba3f5768fc64ab] still in 
aFasterRoute

12:26:55.986 [ca13252e5519903caacca8783b12b6b2, ad1e2070205874ec] in timer route
12:26:55.988 [ca13252e5519903caacca8783b12b6b2, 698855d05a1ae402] in 
aSlowerRoute
12:26:56.990 [ca13252e5519903caacca8783b12b6b2, 698855d05a1ae402] still in 
aSlowerRoute
12:26:56.991 [ca13252e5519903caacca8783b12b6b2, 1ffab7e5f139eb24] in 
aFasterRoute
12:26:57.009 [bbe4122e503a3f9dfdc3806f0e3ea2af, dcb95bf8393b9e38] 
Exchange[ExchangePattern: InOnly, BodyType: String, Body: Tapped]
12:26:57.492 [ca13252e5519903caacca8783b12b6b2, 1ffab7e5f139eb24] still in 
aFasterRoute


^C12:27:01.241 [, ] Apache Camel 4.9.0-SNAPSHOT (camel-1) is shutting down 
(timeout:45s)
12:27:01.246 [, ] Waiting as there are still 5 inflight and pending exchanges 
to complete, timeout in 45 seconds. Inflights per route: [route3 = 1, timer = 4]
12:27:02.248 [, ] Waiting as there are still 5 inflight and pending exchanges 
to complete, timeout in 44 seconds. Inflights per route: [route3 = 1, timer = 4]
12:27:03.249 [, ] Waiting as there are still 5 inflight and pending exchanges 
to complete, timeout in 43 seconds. Inflights per route: [route3 = 1, timer = 4]
12:27:04.251 [, ] Waiting as there are still 5 inflight and pending exchanges 
to complete, timeout in 42 seconds. Inflights per route: [route3 = 1, timer = 4]
12:27:05.252 [, ] Waiting as there are still 5 inflight and pending exchanges 
to complete, timeout in 41 seconds. Inflights per route: [route3 = 1, timer = 4]
12:27:06.255 [, ] Waiting as there are still 5 inflight and pending exchanges 
to complete, timeout in 40 seconds. Inflights per route: [route3 = 1, timer = 4]
12:27:06.990 [ca13252e5519903caacca8783b12b6b2, 941ea6fceb1d3016] 
Exchange[ExchangePattern: InOnly, BodyType: String, Body: Tapped]
{code}

You may notice the wiretap trace belong to the previous exchange, which is 
expected as I made it on purpose to the wiretap to be started with some delay 
and fall into the execution of the following exchange.

> Opentelemetry is using the same traceId when exchange is fired from file or 
> timer component
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-21472
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21472
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-opentelemetry
>    Affects Versions: 4.8.1
>            Reporter: Thomas Gantenbein
>            Assignee: Pasquale Congiusti
>            Priority: Major
>             Fix For: 4.8.3, 4.10.0
>
>         Attachments: image-2024-11-26-09-59-35-555.png, 
> image-2024-11-29-17-04-16-581.png, image-2024-11-29-17-06-26-116.png, 
> image-2024-11-29-17-06-42-860.png, image-2024-11-29-17-12-49-768.png, 
> image-2024-11-29-17-12-58-036.png
>
>
> *Problem*
> When using a consumer like {{timer}} or {{{}file{}}}, the traceId remains the 
> same for all messages. When using a consumer like netty (or, I assume, any 
> other http/tcp-based consumer), every call gets its own traceId as expected.
> See also 
> https://camel.zulipchat.com/#narrow/channel/257298-camel/topic/Same.20OTEL.20trace.20for.20all.20messages.20into.20IBM.20MQ
> *Reproducer*
> [https://github.com/thomas-gantenbein-tga/camel-opentelemetry/tree/main]
> [~pcongiusti], thanks for your answer on Zulip Chat. Let me know if I should 
> further explain or minimize that reproducer.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to