Programmer's Guide to JDK Flight Recorder


Apr 12 2024 36 mins   7
*JDK Flight Recorder (JFR)* is a low overhead profiling and troubleshooting framework built into the Java Virtual Machine. It comes with a powerful programming API that allows you to create application specific events. The API can also be used as a datasource for your own infrastructure for example when building dashboards and triggers. This talk will deep dive into the API and look at events, settings, content types, and other metadata. This video will: - show you how to start and stop recordings, read recording files, and consume events continuously; - demonstrate the FlightRecorderMXBean and how it can be used to control and transfer recording data over JMX; - provide practical tips and guidelines to help you craft your own events. Presented by Joakim Nordström (Oracle) at ØREDEV → https://oredev.org *Questions from the Audience* - 35:12 _"Is the JDK Flight Recorder available for free in all OpenJDK versions?"_ - 35:46 _"In order to make use of JFR, are there any default events included, or do you have to program your own custom events?"_ - 36:16 _"Does JFR have support for virtual threads?"_ *Resources* - Flight Recorder API Programmer’s Guide → https://docs.oracle.com/en/java/javase/22/jfapi/why-use-jfr-api.html - More details on JFR → https://inside.java/tag/jfr