Go to All Forums

APM Java agent - about tracking errors

by ceb1

Hi all,

I am monitoring my Java app using Site24*7. And I want to add some custom application information to tracking data(e.g. like adding internal transaction id and being able to see that data on monitor). But I could not find a way to do it on documents. Is there a way to add that info?

Also when I use Spring's Controller Advice classes to handle exceptions, my exceptions are not monitored as errors so I can not get java traces for that errors. Is there a way to get trace of those exceptions or to monitor them as errors while using Controller Advice at the same time?

Thanks!

Reply 1
Replies (1)

Re: APM Java agent - about tracking errors

by Raji

Hi,

1. Custom instrumentation in Java agent can be achieved using Java annotations. It is at the method level. So, you can move the portion of the code that you want to monitor to a separate method and add annotations, for it to be tracked separately. Refer our help doc https://www.site24x7.com/help/apm/java-agent/custom-instrumentation-using-java-annotations.html for detailed instructions. If you are looking for adding custom metrics / parameters to be tracked, we are yet to support that. But, using this custom instrumentation, you can track any class / method / portion of your java code.

2. Again, Spring controller packages can be included as custom packages in configuration file and you will be able to track those classes and methods.

https://www.site24x7.com/help/apm/java-agent/custom-instrumentation.html  

But, using custom instrumentation will get details in transactions and traces tab. The exception details may not be captured in exceptions tab. We will include these spring controller packages for exception handling and release it in our next update. Will keep this space updated too.

Until then, you can use our custom instrumentation feature for your requirements. Hope this helps.

 

Regards,
Raji.

 

Reply 1