diff --git a/documentation/src/main/asciidoc/introduction/Configuration.adoc b/documentation/src/main/asciidoc/introduction/Configuration.adoc index 22a355462e..fd63260b6f 100644 --- a/documentation/src/main/asciidoc/introduction/Configuration.adoc +++ b/documentation/src/main/asciidoc/introduction/Configuration.adoc @@ -121,6 +121,7 @@ and `com.github.ben-manes.caffeine:jcache` or `org.eclipse:yasson` | <> | `org.hibernate.orm:hibernate-spatial` | <>, for auditing historical data | `org.hibernate.orm:hibernate-envers` +| <>, for monitoring via Java Flight Recorder | `org.hibernate.orm:hibernate-jfr` |=== You might also add the Hibernate {enhancer}[bytecode enhancer] to your diff --git a/documentation/src/main/asciidoc/introduction/Tuning.adoc b/documentation/src/main/asciidoc/introduction/Tuning.adoc index 6f21130c76..13e44cd5d9 100644 --- a/documentation/src/main/asciidoc/introduction/Tuning.adoc +++ b/documentation/src/main/asciidoc/introduction/Tuning.adoc @@ -992,6 +992,17 @@ long publisherCacheMissCount = Hibernate's statistics enable observability. Both {micrometer}[Micrometer] and {smallrye-metrics}[SmallRye Metrics] are capable of exposing these metrics. +[[jfr]] +=== Using Java Flight Recorder + +Hibernate JFR is a separate module which reports events to link:https://developers.redhat.com/blog/2020/08/25/get-started-with-jdk-flight-recorder-in-openjdk-8u[Java Flight Recorder]. +This is different to reporting aggregated <> via a tool like Micrometer, since JFR records information about the timing and duration of each discrete event, along with a stack trace. +If anything, the information reported by JFR is a little _too_ detailed to make it really useful for performance tuning--it's perhaps more useful for _troubleshooting_. + +No special configuration is required to use Hibernate JFR. +Just include `org.hibernate.orm:hibernate-jfr` as a runtime dependency. +In particular, you _don't_ need to enable `hibernate.generate_statistics`. + [[slow-queries]] === Tracking down slow queries