I have a Rails action that has 83% of its run time spent on this:
ApplicationCode in (Nested/Controller/my_controller/my_action
There's an info popup that says this:
Deeper visibility is not available because these classes and methods are not instrumented with the Ruby Agents current configuration. Consult our documentation to find out how to add custom metrics to your app.
I'm not doing anything unusual in this action. Any ideas why it might say this? Is there some internal Rails code that's not being traced?
New Relic agent is not a full profiler. It is able to trace some methods it knows are available in the many frameworks and libraries it supports.
Usually when you see an entry like that (ApplicationCode in (Nested/Controller/my_controller/my_action) it means that either it is code inside that method that is taking too long (think a long running loop) or some of your methods that the agent wouldn't know.
In
my_actionyou could use the Trace API to trace blocks of code.Or for the case that you are calling another method (like in
another_action), you can use method tracers.