Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging and Monitoring Spring MVC Web application

I have a Spring MVC web application running on tomcat. I need to monitor my application for performance, log the time taken by each method call along with the values of the parameters. I would need this logging for all the methods in all the controllers, services, util classes inside the application.

I have seen the question posted earlier here : How to log the time taken by methods in Springframework?

As for the solutions proposed for that question., I have the following concerns in my case.

1) Using Spring AOP for logging - Closely matches the requirements but as far as I know it requires adding annotations to each and every method - would prefer to avoid changing current application.

2) Stagemonitor - Could not follow the installation instructions - it requires installation of docker which I could not because of OS limitation. I am working on openSUSE 11.3 where as docker is available for openSUSE 12.3+

3) SpringInsight - It is a great tool and exactly matches my requirements. But the problem is, it runs is vfabric-tc-server instance. I tried setting up it on tomcat 7 using the steps mentioned by Daniel in Using Spring Insight with Tomcat 6 but it did not workout as none of the jars in insight application has the class com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader which was supposed to be referred from server.xml. Tried adding external jar but it did not work.

I'm wondering if there are any other tools which

-- will not require changing existing application MUCH - simple configuration should be acceptable.

-- will give method level performance monitoring .

-- strictly should not need to migrate the existing applications to other server.

Thanks in advance :)

like image 882
nagamanojv Avatar asked Aug 08 '14 13:08

nagamanojv


1 Answers

Stagemonitor now features a in browser widget that is automatically injected in your web page. You don't need any infrastructure or docker for this and the configuration and set up is easy.

For more information, visit http://www.stagemonitor.org/. This is how you enable the widget: https://github.com/stagemonitor/stagemonitor/wiki/Step-2%3A-Log-Only-Monitoring-In-Browser-Widget#in-browser-widget.

stagemonitor widget

like image 132
Felix Avatar answered Nov 25 '22 13:11

Felix