LATEST VERSION: 3.2 - CHANGELOG
Pivotal tc Server v3.2

What Is Spring Insight Developer?

Note: Spring Insight templates are no longer supported. The documentation is here for reference only.

Spring Insight Developer answers the question “What just happened?” It is a Pivotal Web application that gives you real-time visibility into application behavior and performance.

In development and testing stages, developers can use Spring Insight Developer to verify immediately whether their newly-written code is behaving as designed. QA engineers can pinpoint specific causes for “what just happened” and relay detailed information to developers.

Stress testing an application typically tells you which URL areas are slow. By combining Spring Insight Developer with your existing tools (such as JMeter), you can see not only which URLs are slow, but why, thus accelerating your time to production.

Subtopics

What You Can Do with Spring Insight

How Spring Insight Works

Key Concepts and Terminology

What You Can Do with Spring Insight

The following topics discuss specific use cases:

Agile Development

Web application developers realize a massive increase in productivity when they can make changes and see the effect immediately. Typically, a developer makes changes to HTML or JSP and reloads the browser to verify that the modified application renders the web page as desired. However, developers often lack a centralized tool that shows how their changes affect:

  • JDBC queries
  • Spring bean interaction
  • Calls to external services

Large, popular frameworks such as Hibernate and Spring Web push much of the code that developers formerly wrote manually into a convenient library. This process saves time and improves maintainability. The downside is relinquishing control, which means that the developer may not know exactly what is going on behind the scenes:

  • How many database transactions did a web request create?
  • How expensive is it to use complex web parameter binding?
  • What are the HTTP headers being sent to the developer’s REST application?

The Spring Insight Trace view solves these problems. It allows developers to make changes and verify their effectiveness immediately.

QA Rear View Mirror

Spring Insight gives QA a richer picture of an application’s performance, eliminating much of the work required to diagnose problems. As QA tests an application, typical problems include:

  • Slow-loading pages
  • Database grinding
  • Stack traces

As these problems arise, QA engineers can browse to the Spring Insight dashboard, review all recent operations, and access in-depth information that helps them track down bugs. The dashboard provides information such as:

  • A list of all database queries and their performance
  • A detailed description of the web request, its parameters, and headers
  • A list of component method calls and their parameters
  • A list of all Spring components that were used and their performance

QA forwards this information to the developer, thus improving the turnaround time for identifying and resolving root causes.

Load and Performance Testing

Web applications must be loaded and stressed before being deployed in a production setting. Spring Insight works with your existing load-testing tools to answer two main questions:

  • What was slow?
  • Why was it slow?

After running a load test, Spring Insight displays a breakdown of all requests to Spring Web. It shows you:

  • The response time trend over a designated period
  • A histogram that identifies response time patterns and outliers
  • Detailed statistics, such as 95th percentile response time

Using this information, you can drill down to specific information about why a request was slow:

  • Did the request execute an extremely slow database query?
  • Did it make a call to a remote system that locked up?
  • Did it spend a long time rendering the result?

The request trace information that you access in the Trace view is also available when you analyze a performance test.

Browser Performance Data from Integration with Google SpeedTracer

SpeedTracer is a Google Chrome extension that analyzes how your application is performing inside the browser. It measures how long the browser takes to render, transform CSS, show images, and so on. SpeedTracer integrates Spring Insight data, tying browser performance to backend performance with a robust client-server application performance tool. If your web application uses Ajax and other rich open web technologies, we recommend you try SpeedTracer with Spring Insight.

For details, see Viewing Spring Insight Data in Google Speed Tracer.

How Spring Insight Works

Spring Insight captures application events known as traces. A trace represents a thread of execution. It is usually started by an HTTP request but can also be started by a background job. A trace contains operations. Each operation represents a significant point in the execution of the trace, for example, a JDBC query or transaction commit.

Using this data, Spring Insight calculates summary information to lead you to the specifics of why your application may not be performing as well as it could.

Spring Insight uses AspectJ to intercept operations in target web applications. Target web applications are loaded with a special classloader that dynamically instruments web applications at runtime. Spring Insight uses sophisticated algorithms to keep the memory footprint low. However, Spring Insight-enabled servers require more memory (-Xmx) than a standard server.

Spring Insight Developer and applications run together on a single tc Server runtime instance. Spring Insight’s lean framework keeps developer requirements to a minimum. Developers can deploy a native application to a Spring Insight Developer-enabled tc Runtime instance and immediately see diagnostics. There is no database to set up, no instrumentation to perform.

Key Concepts and Terminology

  • Target application: A Web application for which you want to monitor the run-time performance.
  • Operation: An interface (Operation.java) that plug-ins can implement to store information about the captured work being done. An Operation implementation is an item of work, for example, a socket opening, a cache miss, a method call, or a JDBC SELECT. Operations are defined by plug-ins and contain all the information needed to capture the work being done. Note: Operations must be serializable and can contain only fields that are classes within the JDK or the plug-in itself.

  • Frame: Represents a unit of execution within a call hierarchy. Typically a frame equates to a method call in a stack, but this is not always necessary. A frame can be created for any logical event that a plug-in dictates. A frame holds information about when an event occurred and about the frame’s nested relationship to other frames. The meat of the frame lies within the Operation.

  • Trace: A recording of a single thread of execution for an application. A trace can represent a single web request (and all the work it did), or it could represent a JMS message listener’s processing times. A trace contains a nested tree of frames, which contain the details of the work done.

  • Endpoint: Logical grouping of similar traces within an application. Health and response time metrics are calculated for End Points based on the traces that match that End Point. End Points for a given trace are identified by EndPointAnalyzers that post-process a trace after it is collected. All EndPointAnalyzers known to Insight process each trace. The analyzer with the highest score—that is, the analyzer that the plug-in determines has most closely identified the End Point—defines the trace as belonging to a particular End Point.

    End Points are visible in the Insight dashboard under the Browse Resources tab. For example, in a Spring MVC application, End Points are defined by the @RequestMapping method that receives the request dispatch. All traces dispatched to the same method are members of the same End Point. In a production-ready application, a trace potentially matches multiple End Points. For web requests, the Spring MVC controller defines End Points, but not all web requests are processed by Spring MVC. The raw Servlet to which the request was initially mapped can also define an End Point. In this case, the more specific End Point contains the trace; the Spring MVC End Point trumps the Servlet End Point.

  • Aspect: Primary mechanism used by Spring Insight plug-ins to collect runtime data about a user’s application. Aspects in Spring Insight typically have the role of collecting data about the target application and storing it into implementations of an Operation.

  • Spring Insight: The entirety of Operation collection, End Point analysis, trace storage, and the user interface.