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

Tracing: The active span is null in the EJB interceptor for the MDB onMessage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 15.0.1.Final
    • EJB, MP OpenTracing
    • None
    • Hide

      Build docker and start the docker-compose (mdb-tracer + mdb-jaeger).
      1. mvn clean install -Pdocker
      2. docker-compose up
      3. Call the rest service endpoint: curl http://localhost:8080/mdb-tracer/send
      4. Check the logs: No active span in the EJB interceptor!!!! Class:class org.lorislab.mdb.tracer.ReceiverMDBService Method:onMessage
      5. Check the Jaeger UI: http://localhost:16686/

      Logs:
      mdb-tracer | 16:43:53,867 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 15.0.1.Final (WildFly Core 7.0.0.Final) started in 6638ms - Started 519 of 702 services (343) services are lazy, passive or on-demand)
      mdb-tracer | 16:44:05,798 WARN [org.lorislab.mdb.tracer.CustomInterceptor] (Thread-18 (ActiveMQ-client-global-threads)) No active span in the EJB interceptor!!!! Class:class org.lorislab.mdb.tracer.ReceiverMDBService Method:onMessage
      mdb-tracer | 16:44:05,798 INFO [org.lorislab.mdb.tracer.ReceiverMDBService] (Thread-18 (ActiveMQ-client-global-threads)) Message: TEST
      mdb-tracer | 16:44:05,800 INFO [io.jaegertracing.internal.reporters.LoggingReporter] (Thread-18 (ActiveMQ-client-global-threads)) Span reported: e93b90aabdeae724:e93b90aabdeae724:0:1 - org.lorislab.mdb.tracer.ReceiverMDBService.onMessage
      mdb-tracer | 16:44:05,813 INFO [io.jaegertracing.internal.reporters.LoggingReporter] (default task-1) Span reported: 1896cc67e8637323:1896cc67e8637323:0:1 - GET:org.lorislab.mdb.tracer.SendMessageRestService.send

      Show
      Build docker and start the docker-compose (mdb-tracer + mdb-jaeger). 1. mvn clean install -Pdocker 2. docker-compose up 3. Call the rest service endpoint: curl http://localhost:8080/mdb-tracer/send 4. Check the logs: No active span in the EJB interceptor!!!! Class:class org.lorislab.mdb.tracer.ReceiverMDBService Method:onMessage 5. Check the Jaeger UI: http://localhost:16686/ Logs: mdb-tracer | 16:43:53,867 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 15.0.1.Final (WildFly Core 7.0.0.Final) started in 6638ms - Started 519 of 702 services (343) services are lazy, passive or on-demand) mdb-tracer | 16:44:05,798 WARN [org.lorislab.mdb.tracer.CustomInterceptor] (Thread-18 (ActiveMQ-client-global-threads)) No active span in the EJB interceptor!!!! Class:class org.lorislab.mdb.tracer.ReceiverMDBService Method:onMessage mdb-tracer | 16:44:05,798 INFO [org.lorislab.mdb.tracer.ReceiverMDBService] (Thread-18 (ActiveMQ-client-global-threads)) Message: TEST mdb-tracer | 16:44:05,800 INFO [io.jaegertracing.internal.reporters.LoggingReporter] (Thread-18 (ActiveMQ-client-global-threads)) Span reported: e93b90aabdeae724:e93b90aabdeae724:0:1 - org.lorislab.mdb.tracer.ReceiverMDBService.onMessage mdb-tracer | 16:44:05,813 INFO [io.jaegertracing.internal.reporters.LoggingReporter] (default task-1) Span reported: 1896cc67e8637323:1896cc67e8637323:0:1 - GET:org.lorislab.mdb.tracer.SendMessageRestService.send

    Description

      The onMessage method for the MessageDrivenBean is traced but the active span is null in the EJB interceptor.

              if (tracer.activeSpan() == null) {
                  log.warn("No active span in the EJB interceptor!!!! Class:{} Method:{}", ic.getTarget().getClass(), ic.getMethod().getName());
              }
      

      Motivation: I would like to extend the information (tag,log) in the active span from the EJB interceptor.

      Attachments

        Activity

          People

            jmesnil1@redhat.com Jeff Mesnil
            AndrejPetras Andrej Petras (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: