Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19869

@WithSpan annotations stopped working in WildFly 34

XMLWordPrintable

      In WildFly 33, after configuring OpenTelemetry, both Spans created explicitly using 
      io.opentelemetry.api.trace.Tracer and spans created with the io.opentelemetry.instrumentation.annotations.WithSpan annotation caused spans to be forwarded to the collector.
       
      However, after upgrading to WildFly 34 only the explicit spans are forwarded.
       
      Changes made from 33 to 34:
       
      Version updated from 33.0.2.Final to 34.0.0.Final
      Still using BOM wildfly-ee-with-tools
      Switched BOM from wildfly-microprofile to wildfly-expansion
       
      In both versions, adding the annotations dependency directly as it is not available in a provided scope:
       
               <dependency>
                   <groupId>io.opentelemetry.instrumentation</groupId>
                   <artifactId>opentelemetry-instrumentation-annotations</artifactId>
                   <version>2.8.0</version>
               </dependency>
       
      Example usage:
       
          @ApplicationScoped
          public class GreetingRepository {

                  @Inject private EntityManager em;

                  @WithSpan
                  public Greeting findByLocation(String location)

      {                 return em.find(Greeting.class, location);             }

         
      }

              jaslee@redhat.com Jason Lee
              asgeir@twingine.no Asgeir Nilsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: