X

Topics and trends related to the Java ecosystem with occasional random rants.

  • June 1, 2017

Using Java Flight Recorder Triggers

James Connors
Principal Solutions Consultant

A good amount has been written and said about Java Flight Recorder, its integration into the Oracle Java SE Java Virtual Machine (JVM) and the very low overhead associated with enabling the framework.  It not only makes the notion of collecting detailed runtime information about a Java application in production a possibility, it makes it a reality.

Many opt to place a program in Java Flight Recorder's Continuous Recording Mode.  In this state, the Java application will collect runtime data indefinitely, where you can specify (or default to) how much data you want to retain before overwriting.  Once in this mode, you can at any time, with many different options, dump the runtime information into a self-contained flight recorder file.  From there, the Java Mission Control tool can be used to open this file to further diagnose your running application's behavior.

Rather than randomly or periodically taking Flight Recorder dumps, it is also possible to conditionally do so.  That is to say, you can, though the use of triggers, create rules that will cause a flight recorder dump to take place when a defined condition is met.  It's hopefully not difficult to envision that in this scenario triggers could help you focus on detailed runtime information when things start to go bad, as opposed to looking at a much larger data set.  The video that follows goes through a simple session, demonstrating how to trigger a Flight Recording dump (7 minutes into the video) and briefly uses Mission Control to diagnose the sample application's behavior based on reading the dumped flight recording.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services