Making Application Performance Monitoring a Breeze!

This article was written by Michael Haeuptle, Sr. Software Architect for HP Diagnostics

In this article, I would like to introduce a not so well-known feature in HP Diagnostics that allows application developers to mark important methods and report on their performance in production and pre-production.

 

Out of the box, Diagnostics supports a large number of instrumentation points for a large number of technologies (web services, HTTP, JMS, JDBC, ESBs, Hibernate, etc.). An instrumentation point is simply a method in the application or 3rd party library that provides an important performance aspect of the application.
For example, monitoring the performance of all servlet executions allows us to understand the latency and throughput of all servlet processing.


Instrumentation points are defined in the etc/auto_detect.points file and simply define the method signature that we want to monitor. An example instrumentation point in auto_detect.points file:

 

375iC7F214C9682B7539

 

But this is not the only way to define instrumentation points!

 

Any application developer can define instrumentation points directly while they write Java code. Diagnostics provides customized Java annotations that can be used to indicate that a specific method should be monitored. This is much more convenient since the auto_detect.points file doesn't have to be updated anymore! In addition, application developers can make changes to their code without having to notify operations which methods need to be added in the production auto_detect.points file. The same applies to pre-production too: developers know while they code which methods are performance critical and important to be identified in a load test.

 

In the following example, I annotated a lower level method of my StockQuote web service with the @InstrumentationPoint annotation that Diagnostics provides in lib/annotation.jar:

 

 

376i144E9E5FE5446C67

 

The annotation tells Diagnostics to measure the getQuote method and associate it with the BusinessLogic/QuoteProcessing layer. The flags in the detail attribute indicate that trimming should be disabled (if latency is less than 51ms Diagnostics doesn't report the method invocation) and that CPU times should be reported. More information on the annotation format can be found in the Installation and Configuration Guide.

 

Since this method is invoked by the StockQuote::GetQuote() web service which Diagnostics always instruments, the latency measurements will show up in the Call Profile of the web service:

 

 

 

ScreenHunter_01 Oct. 14 08.47.gif

 

To always measure and trend the performance of the method we can promote it to a "trended method" in the annotation via the layerType attribute:

 

380iEA84634D0B12CA96

We can now see performance metrics such as latency and throughput in the "Trended Methods" view:

 

ScreenHunter_03 Oct. 14 09.43 - Copy.gif

 

If we add an annotation to a method that is not called by another method that has already been instrumented, then it will show up as a Server Request. In the screen shot below I added the annotation to a method that is executed periodically by a thread. Since no other instrumented method is calling the QuoteService.Downloader.download() method it shows up as a Server Request:

382i2E93C9A7031FB8B4

Using annotations during the development process is an easy and convenient way to expose important monitoring information of an application. Since the developers understand best what is important for troubleshooting a performance problem in their application, they can now take control and add annotations while they write application functionality.

This article was written by Michael Haeuptle, Sr. Software Architect for HP Diagnostics

Tags: APM| BAC| Diagnostics
Leave a Comment

We encourage you to share your comments on this post. Comments are moderated and will be reviewed
and posted as promptly as possible during regular business hours

To ensure your comment is published, be sure to follow the Community Guidelines.

Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Search
About the Author
I have been with HP for over 14 years with the past 11 years focused on marketing various HP Software products. Over the past 4 years my pa...


Follow Us
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation