Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Metrics for the nested methods in the flow not showing

metrics
java
javaagent

#1

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).


#2

Hi,

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.


#3

https://rpm.newrelic.com/accounts/1542405/applications/138925750?tw[end]=1558110318&tw[start]=1557851118

To add more information, The method that we’re looking at the Metrics (Under Insights -> Data Explorer -> Metrics) is the “capture”


#4

Any update on this pls & thnx?


#5

Hi,

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.

Even though this function is annotated with @Trace, you still may need to join these tasks using NewRelic.getAgent().getTransaction().getToken() and linking this token in each of the tasks (that will run in other threads). Take a look at our documentation on Instrumenting Asynchronous Applications