We’ve an app which listens to the messages in the Queue and process them. As part of this, we’ve chain of method calls. We’d like to see metric(s) to the methods in that chain of calls. And we tried to do it in different combinations using @Trace annotation. (Without dispatcher and with dispatcher = true). Even, we tried to add @Trace (Without dispatcher and with dispatcher = true) annotation all the way from start to end of the flow.
We observed that the transaction trace is reflected with or without dispatcher = true. Whereas, we couldn’t able to see the metric(s) for some of the nested method(s).
Can you provide a permalink to the application in question? To create a permalink to any page within the New Relic user interface, scroll to the bottom and click Permalink ∞ all the way on the right next to Kiosk Mode. This will show us the exact page and time period that you are observing.
A couple of things that might help here:
When you use the dispatcher = true in your @Trace annotations, it basically means “start a new transaction here”. If a transaction is already happening, the @Trace will simply use the present transaction context.
It’s possible there’s an asynchronous handoff somewhere in between the web request being received and the message being placed on the message queue which we aren’t tracing. I can’t tell that time is spent in async activity or see the message queue activity occurring on an alternate thread, or what message belongs with which web request.