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

MP-OpenTracing Jaeger's can't see a concrete sender

XMLWordPrintable

    • Hide

      Start the server
      Deploy an application like the one from https://github.com/jpkrohling/java-wildfly-tester

      Symptom: on the server logs, the following can be seen:

      14:13:16,289 WARN [io.jaegertracing.internal.senders.SenderResolver] (ServerService Thread Pool – 77) No suitable sender found. Using NoopSender, meaning that data will not be sent anywhere!

      Show
      Start the server Deploy an application like the one from https://github.com/jpkrohling/java-wildfly-tester Symptom: on the server logs, the following can be seen: 14:13:16,289 WARN [io.jaegertracing.internal.senders.SenderResolver] (ServerService Thread Pool – 77) No suitable sender found. Using NoopSender, meaning that data will not be sent anywhere!
    • Hide

      One workaround is to change the modules manually, placing the jaeger-thrift JAR within the same module as jaeger-core, and changing the module definition.

      Copy the JAR:

      cp modules/system/layers/base/io/jaegertracing/jaeger-thrift/main/jaeger-thrift-0.30.6.jar modules/system/layers/base/io/jaegertracing/jaeger-core/main/
      

      Module definition at modules/system/layers/base/io/jaegertracing/jaeger-core/main/module.xml:

      <module name="io.jaegertracing.jaeger-core" xmlns="urn:jboss:module:1.8">
          <properties>
              <property name="jboss.api" value="private"/>
          </properties>
      
          <resources>
      	<resource-root path="jaeger-core-0.30.6.jar"/>
              <resource-root path="jaeger-thrift-0.30.6.jar"/>
          </resources>
      
          <dependencies>
              <module name="com.google.code.gson"/>
      
              <module name="io.opentracing.opentracing-api"/>
              <module name="io.opentracing.opentracing-util"/>
      
              <module name="org.apache.thrift"/>
              <module name="org.slf4j"/>
          </dependencies>
      </module>
      

      Additionally, the module org.wildfly.microprofile.opentracing-smallrye (modules/system/layers/base/org/wildfly/microprofile/opentracing-smallrye/main/module.xml) should have the references to both the Apache Thrift and Jaeger Thrift removed.

      A second workaround is to have the deployed artifact to embed the Jaeger Client artifact, along with a Tracer Factory. A reference can be found on Jaeger Client Java repository:

      https://github.com/jaegertracing/jaeger-client-java/blob/8e9492fcc57fcf308d52096018d82237173b8eb9/jaeger-tracerresolver/src/main/java/io/jaegertracing/tracerresolver/internal/JaegerTracerFactory.java#L21-L26

      Show
      One workaround is to change the modules manually, placing the jaeger-thrift JAR within the same module as jaeger-core, and changing the module definition. Copy the JAR: cp modules/system/layers/base/io/jaegertracing/jaeger-thrift/main/jaeger-thrift-0.30.6.jar modules/system/layers/base/io/jaegertracing/jaeger-core/main/ Module definition at modules/system/layers/base/io/jaegertracing/jaeger-core/main/module.xml: <module name= "io.jaegertracing.jaeger-core" xmlns= "urn:jboss:module:1.8" > <properties> <property name= "jboss.api" value= " private " /> </properties> <resources> <resource-root path= "jaeger-core-0.30.6.jar" /> <resource-root path= "jaeger-thrift-0.30.6.jar" /> </resources> <dependencies> <module name= "com.google.code.gson" /> <module name= "io.opentracing.opentracing-api" /> <module name= "io.opentracing.opentracing-util" /> <module name= "org.apache.thrift" /> <module name= "org.slf4j" /> </dependencies> </module> Additionally, the module org.wildfly.microprofile.opentracing-smallrye (modules/system/layers/base/org/wildfly/microprofile/opentracing-smallrye/main/module.xml) should have the references to both the Apache Thrift and Jaeger Thrift removed. A second workaround is to have the deployed artifact to embed the Jaeger Client artifact, along with a Tracer Factory. A reference can be found on Jaeger Client Java repository: https://github.com/jaegertracing/jaeger-client-java/blob/8e9492fcc57fcf308d52096018d82237173b8eb9/jaeger-tracerresolver/src/main/java/io/jaegertracing/tracerresolver/internal/JaegerTracerFactory.java#L21-L26

      One of the last changes made to WF 14 was to split the MP-OpenTracing dependencies into smaller modules. This introduced a bug where the Jaeger Core module can't see a Sender from Jaeger Thrift. This is loaded via the Service Loader, so, Jaeger Core has to be shipped with Jaeger Thrift on the same module, to avoid a circular dependency (as Jaeger Thrift depends on classes defined on Jaeger Core).

            jpkroehling@redhat.com Juraci Paixão Kröhling (Inactive)
            jpkroehling@redhat.com Juraci Paixão Kröhling (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: