How to make new relic transactions visible for the methods which are masked under servelt filters

Hello, We have setup a new relic dashboard for our java services. For that java service, only single transaction was showing up and because of that and we couldn’t able to see the stack trace. So, after following custom instrumentation and adding @Trace, we are able to see all the transactions in the stack trace.

As we have setup the filter in web.xml file.
Example: this is the filter
<filter-mapping> <filter-name>MiltonFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

So all the calls are going through that Milton filter and in new relic we are seeing only that transaction. Like this.

After adding custom instrumentation, I can see required custom transactions when I go through the stack trace for this main transaction.

My question is, how can I show up transactions directly on new relic which are under MiltionFilter?

Thanks in advance

The developers try to include out of the box instrumentation for many of the common frameworks and technology but not everything the agent encounters is instrumented.

For lack of specific instrumentation, the agent falls back to a naming priority as documented at https://docs.newrelic.com/docs/agents/java-agent/instrumentation/transaction-naming-protocol#priority. This is often the reason behind the transactions being lumped into the names of the servlets or filters.

The recommendation to get more visibility into the transaction activity is to apply Custom Instrumentation. We have a good number of documents on this topic that start at https://docs.newrelic.com/docs/agents/java-agent/custom-instrumentation/java-custom-instrumentation

Consider using the Custom Instrumentation Editor. Let us know if this helps or if you need further detail.

Thank you for the reply.

Yes, I have gone through that custom instrumentation document and my initial thought was to go with the custom instrumentation editor. But I see that for us administrator access is not provided. I have checked XML approach as well. For that also we need administrator access. So, I went with other approach where adding @Trace helped us to view the transactions in stack trace.

Is there any approach can we try other than these XML approach and Custom Instrumentation editor approach?

The Custom Instrumentation Editor (CIE) that provides a way to instrument through the UI requires owner or admin level roles in APM, that is correct. However, the Custom Instrumentation by XML does not have the same requirement as it is a matter of crafting the XML and dropping the file into an /extensions folder

Thanks @Jeanie_Swan,

I will check with my organization to get the access and try out those approaches.

Let us know how it goes if/when you get that access :smiley:

1 Like