Understanding Spring Insight Developer & Insight Operations
Join the DZone community and get the full member experience.
Join For Freeevery developer knows byte code instrumentation (bci) is useful. it automates how you instrument your code, and let’s you see exactly how data is being transferred and manipulated within your application. the level of detail is essential to writing and debugging good code.
the spring framework has its own bci tool, called spring insight. it comes in two flavors: spring insight developer edition (insight) and spring insight operations (insight operations). it is also bundled with appinsight as part of the vfabric application performance suite, and currently only works on java/spring code, a fact that is open to change with the upcoming split-agent architecture .
so what is the difference?
the names may give you a hint: insight is the original tool made for developers, while insight operations is part of what it evolved into being a production support tool. developers get insight with spring tool suite (sts) by clicking a simple checkbox (pictured left), and operations teams can download insight operations as a plugin to work with vfabric tc server . we also support jboss, weblogic, and tomcat.
what spring insight developer edition does for developers
spring insight uses aspectj to intercept operations, organizes them visually, and provides underlying information on each operation. let’s say you are a developer working on some new code behind a submit button. when you go to test the submit button, spring insight captures a trace containing all the operations behind your test. you can see operations like what web requests were made, what objects fired, how much time a rest call took to return from a web service, what jdbc/sql query was made, how long the web page response took to render, and more. it can also work on background jobs and be combined with stress testing to determine why things are slow.
as a developer, you get an organized picture of all interactions from a tool that is simple to install, requires no code modifications, has a light memory footprint, and is extensible through plug-ins for services like cassandra , gemfire , hadoop , hibernate , rabbitmq , redis , and more. to see the full list of plug-ins, go to our open-sourced plug-in repositoryat github, and if what you are looking for isn’t there, it is open for you to write your own plug-ins (remember to please share your plugins – we’d like to check them for security and put them up on the cloud application management marketplace for others to use!). spring insight runs on a single tc server runtime instance without additional database or instrumentation to set up.
once it is set up, you can browse to http://localhost:8080/insight and see how the application behaves for specific requests. in this example, we can see a trace for get/travel/hotels/search took 29ms. within this trace, we can see all the steps leading up the sql query and how long each step took. you can drill down to a specific request and investigate how it behaves throughout its lifecycle. insight extracts all the data you need such as arguments being passed into methods and even sql statements. this fine grained data from the trace details panel (in the screenshot below) helps you find root cause performance issues.
managing devops with springinsight operations
spring insight operations is tuned for production environments and deployed over a cluster of tc server runtime instances. the two apps have similar dashboards and information, but spring insight operations consists of a central dashboard, analyzers, and multiple agents on the monitored application servers and allows you to see performance by the server or cluster in addition to app traces. agent install is easy. all you need to do is download the agent installer from the dashboard and run it on the target machine. everything else happens automatically so you may even deploy to multiple targets via a script.
as shown in prior screenshot, insight presents valuable information which works great for developers working on isolated requests. but, pinpointing a specific request that is of interest in a pile of thousands of requests can be difficult. this is especially true when insight is being used of performance testing or in production environment with multiple servers and instances. in these scenarios, the application health trend graph and application health indicators come in handy. as shown in the screenshot below, you can browse servers, applications, instances, and end-points to see a color-coded health indicator with vitals, health trends, and properties.
in the screenshot below, we have found an application with a problem. the details tell us there’s something wrong with the editownerform#setupform end point. end points are entry points to the application and could be http requests made to the application, jms messages, etc. response time for this end-point appears to be high, over 400ms. we can now further drill into a specific request and see what caused the slow response time. production operations and development teams are now looking at the exact same information.
comparing spring insight developer edition and spring insight operations
the table below compares the two applications across a number of characteristics to help explain the differences.
characteristic |
spring insight developer edition |
spring insight operations |
helps a developer understand what their app is doing in an isolated development environment. |
yes |
yes |
helps see what code is causing problems in more complicated environments like production. |
no |
yes |
development environment use |
yes |
no |
use in testing environments |
yes |
yes |
for use with stress testing |
yes |
yes |
production environment use |
no |
yes |
shows web requests, objects in use, time spent for rest calls, what jdbc/sql was send to the database, and how long web pages took to render |
yes |
yes |
shows information by server, instance, and application. |
no |
yes |
based on aspect j |
yes |
yes |
runs on one runtime instance |
yes |
no |
runs on many runtime instances |
no |
yes |
singular architecture |
yes |
no |
multi-tier agent/analysis/ dashboard architecture |
no |
yes |
can run custom plugins |
yes |
yes |
dashboards and drilldowns |
yes |
yes |
dashboard views of one server |
yes |
no |
dashboard views of multiple servers |
no |
yes |
shows traces and operations |
yes |
yes |
>> getting more information:
- download spring insight (choose your version)
- read the documentation on both versions of spring insight as part of tc server
- visit the plug-ins on github
- learn more about tc server
Published at DZone with permission of Stacey Schneider. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments