You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "fsteccanella (via GitHub)" <gi...@apache.org> on 2023/04/18 12:51:24 UTC

[GitHub] [camel-quarkus] fsteccanella commented on issue #4796: [camel-quarkus-opentelemetry] @WithSpan context missing

fsteccanella commented on issue #4796:
URL: https://github.com/apache/camel-quarkus/issues/4796#issuecomment-1513068290

   Hi @jamesnetherton 
   thanks for the suggestion.
   
   Indeed the "to" component seems to be managed better and allows to trace the bean execution both in 2.13 and in 2.16.
   
   I have performed some additional tests and these are my findings (if they can be useful to someone):
   
   ```java
           from("platform-http:/test")
                   .bean("telemetryBean","span('http')");
           
           from("timer:timer?period=5000")
               .to("bean:telemetryBean?method=span('test')"); //parameters.source was not working for me
   ```
   
   ```java
   @ApplicationScoped
   @Named("telemetryBean")
   public class TelemetryBean {
   
       
       @WithSpan("manualspan")
       public String span(String source) {
           internalMethod();
           System.out.println(source);
           return source;
       }
   
       @WithSpan("internalSpan")
       private void internalMethod(){
           try {
               Thread.sleep(500);
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
       }
   }
   ```
   
   Quarkus 2.16
   No orphan span
   ![image](https://user-images.githubusercontent.com/5019896/232780911-65cbb4ed-8f3c-4603-bf4c-d586a5c84497.png)
   Direct WithSpan method invocation fine, but missing internalMethod details
   ![image](https://user-images.githubusercontent.com/5019896/232780811-e6c8e614-cad2-478e-9be2-93d54208bcd5.png)
   
   Quarkus 2.13
   Orphan span present and missing WithSpan method invocation
   ![image](https://user-images.githubusercontent.com/5019896/232781581-b032e5ec-16f6-4bb9-8b8f-d8c772cc3fd4.png)
   internalMethod details still missing
   ![image](https://user-images.githubusercontent.com/5019896/232781730-cf2dd2b5-d98e-496d-9c19-f72dded52c00.png)
   
   
   
   
   


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org