Trace method (Application code)

Hi.

I have problemas to find out issues of timeouts in my web application.

This is my permalink
https://rpm.newrelic.com/accounts/1252502/applications/15337572?tw[end]=1456419621&tw[start]=1456417821

I had many requests that had a high response time so I decided to try out NewRelic. I have use @Trace on many methods but I always see “Application code”. These are two screenshots that show my problem:

The first one shows how this request spends so much time to start doind its staff which is MobileMain.search() method.

The second one shows how this request reaches our Tomcat’s connectionTimeout (60secs). For that reason, this requests do nothing.

MobileMain.search() has @Trace and every method inside it (like MobileMain.inicializar()) also have @Trace. My question is, why are there the “Application code” trace?

Another example (also FiltroI18n.doFilter() has @Trace)

In this example you can see the same problem which is that “FiltroI18n” takes long time but I am not able to see any traces from that piece of code.

Please, could you help me?

Thanks in advance

Hi Sfernandez,

When you are seeing “Application Code” in your transaction traces, it indicates that there are classes and methods that the Java Agent is not instrumenting. In this case, I would recommend using our [Custom Instrumentation Editor] (https://docs.newrelic.com/docs/agents/java-agent/custom-instrumentation/custom-instrumentation-editor-quickly-customize-your-java-instrumentation) to turn on instrumentation for those methods. However, it looks like you’re already using @Trace annotation on your code base, so you’re taking advantage of custom instrumenting the methods for which you’d like to see more transaction data.

I think in this case it would be helpful to create a ticket so that you can send me [finest level logs] (https://docs.newrelic.com/docs/agents/java-agent/troubleshooting/generating-logs-troubleshooting-java) while generating traffic on the methods you’d like to see more transaction data. This will help me see what the Java agent is recording. Can I have your permission to create a ticket from your post?

Hi bskarich.

Please help me. Create that ticket.

Hi everyone.

I have instrumented my code more precisely (java) and I get stucked on this. Attached you have my problem:

As you can see, there is only one line where NewRelic says time is spent but this line just get parameters from the request…

Thanks for that helpful info, @sfernandez! I can see you have a support ticket going with a subject matter expert on this. Feel free to update us all in this thread once you get it sorted! It will help future forum users a ton! :blush:

A post was split to a new topic: Trace Method PHP Agent

Hi
experiencing the same issue, could you let me know the resolution for same

If by “same issue” you are encountering “Application Code” in your Transaction Traces, you might find some help with Relic Solution: What does "Application code" mean?.

Let us know if you meant something else.