AppStats Framework

AppStats is a lightweight, open source framework developed and used by Grand Central Communications, Inc. to capture, analyze, and publicize health, performance, and monitoring statistics for Java applications.

See:
          Description

Packages
com.grandcentral.appstats  
com.grandcentral.appstats.calculators  
com.grandcentral.appstats.impl  
com.grandcentral.appstats.reporters  
com.grandcentral.appstats.util  

 

AppStats is a lightweight, open source framework developed and used by Grand Central Communications, Inc. to capture, analyze, and publicize health, performance, and monitoring statistics for Java applications.

The framework is designed to be extensible and easy to use. Design goals include:

How to use AppStats

AppStats was built with two actors in mind:

For the application developer, the primary interface is to work with is a Task. You can use either a unsynchronized or synchronized task (or you can implement your own depending on your synchronization needs). It is recommended that every application have a single root task, and then child tasks for sub processes, threads, or components.

How to calculate statistics with AppStats

Say you're recording a transaction's latency in AppStats. How do you determine the current running average? AppStats provides two means for this: StatAggregator and StatCalculator. The StatAggregator uses some basic predefined methods for calculating statistics, referenced in the Stat interface, whereas the StatCalculator is meant for customized and generally more complex statistical calculations. Either of these are used by the Task interface when aggregating Stats in a Task hierarchy.

How to query AppStats for current application statistics

The interface for this is still being worked out, but it is likely to be a remotable subset of the Task interface. The short of it is, you use methods like Task.getStats to get the current application statistics, and then format them any which way you need to to make them available to your network management infrastructure. We have a few basic "reporters" available for HTML and TXT viewing. We hope to have a JMX and an RMI adapter soon.