Java Runtime Monitoring, part 2nd: Post-compilation and performance monitoring __java

Source: Internet
Author: User
Tags ibm developerworks

As you learned in part 1th of this series (three articles), monitoring the availability and performance of Java applications and dependencies in production is critical to ensuring problem detection and accelerating problem diagnosis and repair. Source-code-level inserts for classes that need to be monitored have the advantages that are discussed in part 1th, but this method is often not available or impractical. For example, many of the monitoring points you are interested in may be in third party components, and the source code for Third-party components is unknown to you. In the 2nd part, I focused on ways to insert Java classes and resources without modifying the original source code.

Alternative methods of arranging inserts in the source code are: interception class packing byte code insert

This article uses the ITracer interface presented in part 1th to implement performance data tracking, illustrating these techniques in turn.




Back to the top of the page


Java Inserts by intercepting

The basic premise of interception is the conversion of a particular invocation pattern through an interception construct and the collection of incoming inbound and outbound call information. The implementation of a basic interceptor will: Gets the current time of the request to the inbound call. Retrieves the current time of the outbound response. Calculates the run time as an increment of two measures. Submits the call's elapsed time to the application performance management (APM) system.

Figure 1 shows the process:
Figure 1. Basic process of performance data collection and interception program




This article has been transferred from IBM Developerworks China

Please click here to view the original

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.