1. Home
  2. Docs
  3. Recording
  4. Java Flight Recorder

Java Flight Recorder

Although the Jeyzer Recorder is the recommended way to go, you may use JFR as a replacement solution,
especially if the DevOps are not ready to deploy the Jeyzer Recorder agent in a production environment.

Usage

Please refer to this documentation.

Configuration

It is recommended to use the jeyzer.jfc configuration file shipped
within any Jeyzer Recorder or Jeyzer Ecosystem installation 2.4+ (<jeyzer home>/jfr directory).

This configuration defines the optimal JFR settings to :

  • limit the performance impact of JFR
  • record only the information required for a Jeyzer analysis

The thread dump period is set by default to 30 seconds.
To update it, edit the jeyzer.jfc file and change this parameter value :
<setting name="period" label="Period" description="Record event at interval" contentType="jdk.jfr.Period">30 s</setting>

JFR events

The following JFR events are captured and analyzed by Jeyzer :

  • jdk.CPUInformation
  • jdk.GarbageCollection
  • jdk.GCConfiguration
  • jdk.GCHeapSummary
  • jdk.G1HeapSummary
  • jdk.InitialEnvironmentVariable
  • jdk.InitialSystemProperty
  • jdk.JVMInformation
  • jdk.ModuleExport
  • jdk.ModuleRequire
  • jdk.OldGarbageCollection
  • jdk.OSInformation
  • jdk.PhysicalMemory
  • jdk.PSHeapSummary
  • jdk.ThreadAllocationStatistics
  • jdk.ThreadCPULoad
  • jdk.ThreadDump
  • jdk.ThreadEnd
  • jdk.VirtualThreadStart
  • jdk.VirtualThreadEnd
  • jdk.VirtualThreadPinned
  • jdk.YoungGarbageCollection

JFR limitations

At this stage, Jeyzer provides the same level of analysis on both JFR recordings and JZR recordings.
In the near future, extra JFR data will be handled and analyzed.

Some monitoring data – captured with the Jeyzer Recorder – is not available in JFR :

  • The system properties created by the application. It limits the process card usage in Jeyzer.
  • The list of loaded jar files. It prevents the usage of the process jar versions in Jeyzer : alternative is to use the module versions.
  • The loaded jar file manifest attributes
  • The disk space checks
  • The data capture durations
  • The Jeyzer Publisher events (expected). Those could be replaced by the JFR events on JDK 15+ (not yet supported).

The Jeyzer Monitor cannot process yet the JFR recordings : you must still use the Jeyzer Recorder.

JFR testing

The JFR recording generation and analysis has been performed with the following JDK 11 implementations :

  • OpenJDK
  • Oracle JDK
  • Azul Zulu JDK
  • Amazon Correto JDK

JFR documentation

For more details about JFR, please see :
https://docs.oracle.com/javacomponents/doc/JDMUG/using-jdk-flight-recorder.htm

Source code (Java 11) :
https://github.com/AdoptOpenJDK/openjdk-jdk11/tree/master/src/jdk.jfr/share/classes/jdk/jfr

Source JFR events index :
https://sap.github.io/SapMachine/jfrevents/index.html