fsteccanella opened a new issue, #4796:
URL: https://github.com/apache/camel-quarkus/issues/4796

   It seems that the trace context is being kept only if the trace is being 
initiated by an http request.
   
   Given the following bean:
   ```java
   @ApplicationScoped
   @Named("telemetryBean")
   public class TelemetryBean {
   
       @WithSpan
       public String span(String source) {
           System.out.println(source);
           return source;
       }
   }
   ```
   
   And the following route builder:
   ```java
   @Override
       public void configure() throws Exception {
           from("platform-http:/test")
                   .bean("telemetryBean","span('http')");
   
           from("timer:timer?period=5000")
                   .bean("telemetryBean","span('test')");
       }
   ```
   
   This are the collected traces:
   
![image](https://user-images.githubusercontent.com/5019896/232737389-6407ae7b-2c2c-40d0-ba17-18e2bcd8ab39.png)
   
   The first one contains 2 spans correctly related:
   
![image](https://user-images.githubusercontent.com/5019896/232737619-c91397a0-3bb5-44da-b195-86692bac8b2f.png)
   
   While the second and the third traces contains two unrelated spans that 
should be instead related each other
   


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