Adding custom events

There is a simple Java API that can be used to contribute custom events to flight recordings. It is located under the package com.oracle.jrockit.jfr and is distributed as part of the JRockit JDK. It is located in the JRockit rt.jar.

Note

The com.oracle.jrockit.jfr API is under development, and not currently supported outside Oracle. Some internal Oracle products, like WebLogic Server already use it to plug into JRockit Flight Recorder.

To create a custom event using the API, first decide what kind of event is needed. You may recall from the start of this chapter that there are four main event types. Depending on what kind of event is needed, a different event class will need to be extended. There are four different ones, each ...

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.