Use Spring Insight Developer to Analyze Code, Install it with Tomcat, and Extend it with Plugins

posted by duncwinn on December 4, 2012 01:33 PM

People are still discovering the benefits of the free tool from VMware SpringSource, called Spring Insight Developer. This post provides an explanation of what Spring Insight Developer does, how to set it up with Apache Tomcat, and an example of available plugins.  For a better visual, there is also a video of the new Spring Insight 1.8.3 GUI embedded below.

Spring Insight is an extremely useful, time-saving, free tool for Spring developers and also has plugins for Grails, GemFire, Hadoop, Hibernate, JMS, JNDI, LDAP, MongoDB, RabbitMQ, Redis, Spring Batch, Spring Integration, Tomcat, and many more on Github.  In the latest release of Spring Insight, VMware introduced a new "split-agent" architecture that will enable this tool to be extended to more runtime languages besides Java, such as .NET, Ruby, PHP, Python, etc. There is also a bounty program where you can get paid to develop new plugin or offer to pay others.

What does Spring Insight Do?

In a nutshell, Spring Insight Developer lets you see what your code is doing. When, as a developer, you press a button in your application’s GUI, you can see what Java code is invoked, how it translates into SQL, and quite a bit more. Before we show it in action, it’s worth mentioning a few of the benefits.

Let’s take a look at a simple example of tracing your app, viewing the details, and seeing the code in action.

Step 1: Trace Your App

In the screen shot below, there are two windows.

  • The top window shows the “Recent Activity” tab within Spring Insight running on localhost. This tab shows the “Trace History” over time. A Trace represents a thread of execution. It is usually started by an HTTP request made up of one or more operations starting with Endpoints (e.g. a GET service or other receptor of requests) but can also be started by a background job.
  • The bottom window shows the VMware vFabric SpringTrader Reference Architecture application running and the button “Get Quote” being pressed. When you press the button, the Trace is captured in the history above along with the operations details.

Step 2: View the Trace Details

In the screen shot below, we see the last Trace in the history (top right) highlighted in dark green.  For any user request, Spring Insight shows each Trace organized by Endpoint within an Application.  Below the Trace History, we see the individual traces. We have the QuoteController#findQuote Endpoint highlighted. It took 8ms for the GET /spring-nanotrader-services/api/quote/VMW to run from the Application spring-nanotrader-services. Below this, we see the trace details (including the breakdown of what took the most time in the 8ms trace):

  • Filters for servlet operations like security and authentication
  • The QuoteController#findQuote request/response servlet operation
  • A JDBC SELECT (QUOTE) database call

Step 3: Seeing the Method Call, Arguments Passed and Returned

By expanding QuoteController#findQuote, we can see the “VMW” argument passed in from the original GUI interaction, the return value, and the source code location. We could also see the SQL passed or similar details in a SQL transaction. This let’s you quickly drill down into problem areas that take too long.  Keep in mind, Spring Insight Operations let’s you do this in production systems too.  

How to Install Spring Insight for Tomcat

Spring Insight comes in two forms, to understand the differences, see the post on Understanding the Difference between Spring Insight Developer & Spring Insight Operations. Neither option will provide an easy mechanism for installing Insight with Tomcat, but the set-up is not terribly difficult.

  • Download vFabric tc Server Developer
  • Create a vFabric tc Server instance which has Insight enabled.
  • Download the latest Apache Tomcat 6.0.x or 7.0.x
  • Copy the following files & folders from the tc Server instance w/Insight
    • bin/
    • bin/insight-bootstrap-tcserver-1.8.3.RELEASE.jar
    • insight
    • lib/*
    • webapps/insight.war
  • Edit conf/server.xml and add the following Valve to the Engine block.
  • <Valve className="com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve"/&gt;
    • Edit conf/context.xml and add the following before the closing Context tag.
    • <Loader loaderClass="com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader" />
    • <Listener className="com.springsource.insight.collection.tcserver.lifecycle.ApplicationLifecycleCollectionListener" />
  • Start the Tomcat instance.

Plug-In Architecture Example: Using Spring Insight with RabbitMQ

As mentioned above, there is a wealth of plugins available. In case you missed it, there is a post on the RabbitMQ Plugin for Spring Insight. This plugin allows for monitoring RabbitMQ Java client libraries at the code-level and allows you to monitor your application's performance around publishing and receiving messages with RabbitMQ. There is a more detail and an example screenshot in this article.

The entire list of Spring Insight Plugins is available at Github
You can download Spring Insight on tc Server or with STS.

Video of Spring Insight Developer 1.8.3

This video shows how Spring Insight can be used by developers, explains it’s integration with Google Speed Tracer, and then shows how it is integrated with SpringSource Tool Suite.


è Le Mikrograph (1916); la

è Le Mikrograph (1916); la première 1 / 100e de seconde du chronomètre mécanique. Présenté par Charles-Août replique montres Heuer, le Mikrograph 1 / 50e et 1 / 100e, deux chronomètres brevetés battant respectivement à 180, 000 et 360, 000 alternances par heure, a révolutionné le sport pour toujours et conduit Tag Heuer pour devenir le chronométreur officiel des Jeux Olympiques dès 1920.

thanks nice blog

I am thankful for the article.Really looking forward to read year 2016 happy new year 2016 bonne année 2016 rr


shadow fight 2 mod I read this article. I think You put a lot of effort to create this article. I appreciate your work. clas of clan

cool good

Thanks for all your information, Website is very nice and informative content.

happy new year 2016 wishes
happy new year 2016 images
Happy diwali 2015 sms
Frohes neues Jahr 2016
feliz ano novo 2016
current affairs 2016
año nuevo 2016
feliz año 2016
imagenes de feliz año nuevo 2016
Happy new year 2016 wallpaper

stuart weitzman canada

In fact, the Ray Ban Wayfarer Cheap Louis vuitton Sale sunglasses could possibly be the design that will pavesCheap Gucci handbags the tactic to the attention Cheap Gucci outlet of the trademark. To supply a clearer wholesale Gucci Handbags take a look at around the model, allow me provide you with obtaining a Hermes Handbags UK terrific offer a lot more fascinating Uggs Fake facts. Before something different entirely, Jordans Cheap are suffering from initial talk regarding the Ugg Boots Cheap people getting on the spine Jordans for sale with the Ray Prohibit wayfarer Hermes Designer Handbags sunglasses. The guru at the rear Ugg Boots For Women of the stated design and style could be Cheap Fake Ray Bans the one holding the particular patent for Discount Jordan shoes the well-known Bausch Cheap Jordans for sale and Lomb.

Post new comment

This question is for testing whether you are a human visitor and to prevent automated spam submissions.