
• | ||
• | ||
• | ||
• | ||
• | ||
• |
• | JDBC queries | |
• | Spring bean interaction | |
• | Calls to external services |
• | 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? |
• | Slow-loading pages | |
• | Database grinding | |
• | Stack traces |
• | 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 |
• | What was slow? | |
• | Why was it slow? |
• | 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 |
• | 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? |
• | Linux 64 bit, Sun Hotspot 1.6 JVM | |
• | Windows 32 bit, Sun Hotspot 1.6 JVM |
• | Installing a developer edition of the tc Server application server
that includes the Spring Insight feature. | |
• | Creating a tc Server instance using the Spring Insight template so
that the instance is immediately enabled with the Spring Insight
feature. |
1.
| Download the Spring Insight distribution from the Spring Insight Product Page. (The Spring
Insight distribution is part of Spring tc Server Developer
Edition.) The distribution file is called
tcServer-6.0.20.C-GA-devedition-PREVIEW.tgz. | |
2.
| Unpack the Spring Insight distribution file into a temporary
directory. For example, to unpack the Unix file in a directory
called /home/unpack and assign the extracted files to
the same group as the user executing the command, use the
tar command:
This command creates a sub-directory called
tcserver-6.0.20.C-devedition-PREVIEW. | |
3.
| Start a terminal (Unix) or command prompt (Windows). | |
4.
| Change to the directory in which you unpacked the tc Server
distribution file and execute the install.sh (Unix)
or install.bat (Windows) script. For example, on
Unix:
The installation program performs checks
of your system, then displays a menu:
Note: You must run the
install.sh script from the directory in which it
lives, and not from any other directory, or you will get an
error. | |
5.
| Enter 1 to install the tc Server application
server. | |
6.
| If you have not done so, create a directory into which you will
install the tc Server application server. Enter the full pathname of
the installation directory, for example,
/home/springsource. >
Important: The
specified directory must already exist; the install program does not
create it for you. | |
7.
| After confirming your entry, the installation program installs
tc Server and returns you to the main menu. | |
8.
| Enter 2 to exit the installation
program. | |
9.
| Change to the main tc Server installation directory. For
example, if you specified that you wanted to install tc Server in
/home/springsource, change to the
/home/springsource/tcServer-6.0 directory:
| |
10.
| Use the tcserver-instance.sh (Unix) or
tcserver-instance.bat (Windows) command script to
create a tc Server instance that uses the
spring_insight template. For example, on Unix:
In the preceding example, the script creates a tc Server instance
called insight in the current directory. Also,
it is assumed in the example that you have set your
JAVA_HOME environment variable to point to an
installed JDK/JRE and the tcserver-instance.sh script
will subsequently refer to it; if, however, this is not the case, use
the -j option to point to its location:
| |
11.
| Start the newly-created tc Server instance with the
tcserver-ctl command script. On Unix:
On Windows, start the instance as a foreground process:
| |
12.
| From your Web browser, invoke the Welcome page for the tc
Server instance:
where host refers to the computer on which
you installed tc Server. If it is the same as the browser's computer,
you can use localhost:
| |
13.
| To start Spring Insight:
| |
14.
| To shut down the tc Server instance on Unix, run the following
command from /home/springsource/tcServer-6.0
directory:
On Windows, enter Ctl-C in the command window where you started the
tc Server foreground process. |
# # The Spring Insight(tm) configuration file (in YAML) # # Number of wall-clock milliseconds that a trace must consume # in order to be added to the trace repository. minTraceDuration: 0 # Maximum # of traces which will be stored in memory maxInMemoryTraces: 2000 # How many traces will be purged when the maximum limit is reached? tracePurgeBatch: 200 # Paths to exclude from tracing (in ant path format) excludeTraceByPath: - /**/*.png - /**/*.gif - /**/*.jpg - /**/*.css - /**/*.js # The number of seconds a request must complete in for # it to be deemed 'satisfactory'. This threshold is used # to calculate the color of the health bar for endpoint # response time. # The formula for calculating the health bar closely # corresponds to the Apdex formula. # See apdex.org for more details. healthyResponseTime: 0.2
Property and Default Setting | Description |
minTraceDuration: 0 | Minimum required duration of a trace
should take (in milliseconds) for it to be captured by the
system. This setting prevents extremely short requests from
being processed and cluttering your view. |
maxInMemoryTraces: 2000 | Defines how many traces are kept in
memory. Once this limit is reached, the oldest trace is
discarded. The Spring Insight application does its work in
memory and does not require a database. |
tracePurgeBatch: 200 | Defines how many traces are purged at
once, once maxInMemoryTraces has been reached.
By purging many traces simultaneously, Spring Insight frees
memory more efficiently. |
excludeTraceByPath: | Provides a list of patterns that are
matched against requests. When a trace matches a path in this
list, the trace is discarded. This setting lets you ignore
requests to static content such as .css or .js files. For
example:
The -prefix is important. It is the
YAML identifier showing that the items are in a
list. |
healthyResponseTime: 0.2 | Divided into categories: satisfying,
tolerated, and frustrating. This property defines the maximum
response time that can be satisfying. For example, if
healthyResponseTime = 0.3 then a response in 100ms is
satisfying. This setting gauges the colors of the indicators for
response time (excellent, good, fair, poor,
unacceptable). |
prompt$ cp /home/apps/myApp.WAR /home/tcserver/tcServer-6.0/insight/webapps
1.
| Initiate activity by using your Web application; the exact
steps depend on what your application actually does. Spring
Insight traces all application activity and displays it on the
dashboard. For example, if you performed any JDBC queries, each one is
shown in the Spring Insight dashboard along with a timeline of recent
requests. | ||||||||||
2.
| Browse to the Spring Insight dashboard: http://host:port/insight where:
For example: http://localhost:8080/insight The browser
invokes the main Spring Insight dashboard on the Recent Activity
screen and displays recent traces from your application. A
trace is a breakdown of the activity of a request. The Recent
Activity screen answers the question What just happened? ![]() | ||||||||||
3.
| In the top-right Application Selector drop-down box,
select the name of your application. Use the Application
Selector to view activity for all applications or for just
a single one. Viewing all applications at once is useful when you
deploy many Web applications and are interested in activity across the
entire set. Viewing a single application filters out activity not
related to that application. The Trace History panel
shows a timeline of the recent activity of your application as
real-time requests, represented by bars in the chart. Each bar
represents all requests that occurred within a time slice, as measured
by the chart. The full time range has 60 time slices. The height of
the bar is equal to the longest request that occurred during that
window. The Trace History graph shows activity that
Spring Insight has monitored over the past N minutes. When a
trace is captured by Spring Insight, it shows on the graph as a bar on
the right-hand side. As time moves on, bars move left until they fall
out of the time range. Click on bars to drill deeper. | ||||||||||
4.
| Click on one of the bars in the Trace History chart.
Spring Insight displays a list of traces in the Traces
panel that executed during the window of time (or time slice), and
then details about a specific trace. Spring Insight automatically
shows details about the first trace in the Trace Details panel.
If you click on a different trace, Spring Insight refreshes the
details panel with corresponding information. The Spring Insight
dashboard shows the Traces and Trace Detail panels. ![]() You can sort the traces in the Traces
panel by Duration (how long did the trace take?), Start (when did the
trace start?), or Label (what was the request?) | ||||||||||
5.
| Click on a trace in the Traces panel to view its details
in the Trace Detail panel, as shown by the following
screenshot: ![]() The Trace Detail panel contains a
breakdown of a trace's activity in a tree format. A trace consists of
a top-level operation, usually a Web request, and all nested
operations. Operations are the fundamental building blocks of
traces. An operation can represent a Web request, a transaction, a
call to an MVC controller, a file opening, a service request, and so
on. Each operation may have other operations nested within it. The
nesting structure shows the normal stack-based method invocation
pattern. The operation timing graph shows two pieces of
information:
Click on an operation's label, or the entire row, to drill
further into the operation details. The details of this panel are
specific to each type of operation, and contain the finest granularity
of collected data. | ||||||||||
6.
| In the Control menu directly below the Application
Selector, control the information you see in the Spring Insight
dashboard by:
|
1.
| From the main Spring Insight dashboard, click the
Application Health link. If you haven't already done so, select
your application from the application selector. The following
graphic shows a sample application health screen for the
swf-booking-mvc application: ![]() Each row represents an endpoint, which is a receptor for
requests. The universe of all possible HTTP URLs is unlimited.
However, Spring Insight can group requests together based on the
controller with which the requests are associated. For each endpoint,
Spring Insight displays the following information:
| ||||||||||||||||
2.
| Click a particular endpoint to view details of the recent
activity of a specific endpoint (mostly its response time), as shown
in the following screenshot: ![]() The Response Time Trend chart shows the
mean response time of the endpoint over the time range. The
Response Time Histogram is an interactive graph that shows how
many invocations occurred within a given time period. The Y-axis
represents the response time of an invocation. The X-axis represents
the number of invocations. Using the histogram is an easy way to
identify outliers in your data. The longest-running invocations are
always at the top of the histogram. If extreme outliers exist, they
are indicated by red bars. | ||||||||||||||||
3.
| Click a bar in the histogram. A Representative Traces
panel shows representative traces for some invocations that occurred
during the selected duration. ![]() The
Representative Traces panel includes similar data as that of
the Recent Activity screen. From here it is easy to drill into
the shortest or fastest running traces to see what made them
different. |