Home > Blogs > VMware vFabric Blog

3 Steps on Using Spring Insight Developer to Analyze Code

If you don’t know about Spring Insight Developer, this post may save you tons of time and potentially headache.

Imagine that you need to update some code behind a button, but you didn’t write the code. What if you could press the to-be-coded button and then see what code was invoked (including methods and arguments), the SQL invoked, and the time it took to execute?

This is what Spring Insight Developer allows you to do, and more.

It’s also free, and it uses AspectJ and AOP to load-time weave your application, you do not have to make any changes to your application code to use it.

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.

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.

Extending the Insight with a Plug-In Architecture and RabbitMQ Example

Spring Insight has plugins for Grails, GemFire, Hadoop, Hibernate, JMS, JNDI, LDAP, MongoDB, RabbitMQ, Redis, Spring Batch, Spring Integration, Tomcat, and many more on Github.  With these plugins, you can get insight across a significant set of components and architectures. There is also a bounty program where you can get paid to develop new plugins or offer to pay others. As an example, there is a post on the RabbitMQ Plugin for Spring Insight with more detail. The Rabbit plugin allows you to monitor 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.

What are some Benefits?

About the Author: Duncan Winn is currently an architect with VMware’s SpringSource division.  He has also worked at GE and IBM where he spent a considerable amount of time as a developer porting many well established commercial middleware products onto new platforms before moving into management and producing monitoring and diagnostics tooling for the JVM and Java language. More recently, he has been working to help customers transform their legacy applications and platforms into agile, lightweight alternatives to drive value back into their business. His expertise includes Java development, Websphere, Agile, middleware, SOA, in-memory data grids, cloud provisioning, PaaS, and legacy transformation.  He has a degree and MSc in Oceanography from the University of Plymouth and the University of Southampton, and an MSc in Computer Science from the University of Birmingham.

22 thoughts on “3 Steps on Using Spring Insight Developer to Analyze Code

  1. credit suisse pamp

    Hi there friends, nice article and good urging commented here,
    I am really enjoying by these.

  2. Pingback: VMware vFabric Blog: A Tale of Modernization: Stopping Bank Robbers as a Service (20 Billion Times to Date) | Virtualization

  3. Pingback: Building a Multi-Tenant Development Mindset in the Travel Software Industry | VMware vFabric Blog - VMware Blogs

  4. Pingback: Scaling in Complex Domains Using CQRS, Axon, and Spring Insight | VMware Virtualization & Cloud Management - VMware Blogs

  5. http://wlimail.com

    Hello there! This blog post couldn’t be written
    any better! Looking through this article reminds me
    of my previous roommate! He always kept talking about this.
    I will send this information to him. Pretty sure he will have a
    good read. Thank you for sharing!

    Here is my homepage :: http://wlimail.com

  6. robot patissier

    Your means of describing everything in this post is really fastidious,
    all be able to effortlessly know it, Thanks a lot.

    Feel free to surf to my web site: robot patissier

  7. lissage bresilien keratine

    Commandez votre soin cheveux bresilien keratine sur le web

    Feel free to surf to my web-site; lissage bresilien keratine

  8. bitcoin

    tout pour commander des litecoins anonymement sur le réseau
    internet tout de suite

    My web site – bitcoin

  9. robot piscine zodiac

    At this moment I am going away to do my breakfast, once having my
    breakfast coming over again to read other news.

    my page … robot piscine zodiac

  10. خرید کریو

    hello body
    This blog post couldn’t be written
    any better! Looking through this article reminds me
    of my previous roommate! He always kept talking about this.
    I will send this information to him. Pretty sure he will have a
    good read. Thank you for sharing!

  11. وی پی ان

    im using vmware since 7 years ago i remrmeber that the first verison theat i used was runing on windows os based and next verisones come with esxi name
    i love esxi and i also bought that for my all servers

  12. کلمات کلیدی سایت

    love post

  13. حوادث ایران وجهان

    follow post

  14. تجارت الکترونيک

    very good i like post

  15. i7networks.in


  16. presented.in

    fdp]dsfldsplfdpl[ dfpoksdfposdf

  17. تخفیف

    thank you very good

  18. هارمن کاردن Onyx Studio 3

    2312312 asdsdasd 213 asdsa dasd

  19. matin

    thank you very good

  20. Mama Kelly

    This blog post couldn’t be written any better!
    my page … doyousew.com

  21. rayan

    follow post and visit 6 Best Windshield Washer Fluid

  22. Thongad Danny

    Thank you very good! and visit Continental ExtremeContact DWS06 Review


Leave a Reply

Your email address will not be published. Required fields are marked *