Skip to content

A polyfill for JDK Flight Recorder (JFR) to avoid errors on JDKs that don't support JFR yet

License

Notifications You must be signed in to change notification settings

gradle/jfr-polyfill

License Maven Central GitHub Workflow Status

JFR Polyfill

JDK Flight Recorder (JFR) is a high performance event recorder built into the Java virtual machine. It was open sourced with OpenJDK 11 and then back-ported to OpenJDK 8.

The jfr-polyfill library is a no-op polyfill implementation of the jdk.jfr.* interfaces and classes. The goal is to enable projects to add JFR events to their codebase without dropping support for old JDKs that don’t support JFR. The polyfill will not provide any recordings on unsupported JDKs, but it will prevent ClassNotFoundError.

If you want to know more, read the investigation into which JDKs support JFR, and how you can validate your own JDKs.

Usage Instructions

Just add org.gradle.jfr.polyfill:jfr-polyfill (latest version) as a dependency, it will serve as fallback implementation when JFR is not available. If native JFR is available, it is on the boot classpath and will take priority over the polyfill.

Contributing

This project adheres to the Gradle Code of Conduct. By participating, you are expected to uphold this code.

About

A polyfill for JDK Flight Recorder (JFR) to avoid errors on JDKs that don't support JFR yet

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published