- Verbosity: Yep, just like Log4J (and many other logging packages) the Level of loggers can be modified at runtime through JMX or simply by placing a watch on the XML configuration file.
- Thresholds: Automatically trace incidents when measurements exceed externally defined thresholds.
- Ranges: Automatically trace counts of measurements that fall into a value window as part of an externally defined and named range. (useful for SLAs where an operation's elapsed time might be classified as GOOD, WARN or CIRITCAL.)
- Rollups: Maintain aggregated performance statistics all the way up a hierarchical tree.
- Interceptors: J2EE and a bunch of other [not just] Java frameworks support the ability to inject interceptors into the application without ever touching the source code of your code application classes.
- Class Wrapping: Implement instrumentation in a class wrapper and then wrap your target class. You get the same functionality and instrumentation to boot.
- Byte Code Instrumentation: Inject instrumentation byte code directly into your already compiled classes. This can be done statically (i.e. you end up with the original jar and and instrumented jar) or it can be done dynamically at runtime when the classes are classloaded.
java.net.Socketand adds in some basic instrumentation like counting byte transfer rates. At class load time, you could swap out the implementation of all instances of
java.net.Socketwith your instrumented version.
Hopefully the article is useful to you.