Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ and `com.github.ben-manes.caffeine:jcache`
or `org.eclipse:yasson`
| <<spatial,Hibernate Spatial>> | `org.hibernate.orm:hibernate-spatial`
| <<envers,Envers>>, for auditing historical data | `org.hibernate.orm:hibernate-envers`
| <<jfr,Hibernate JFR>>, for monitoring via Java Flight Recorder | `org.hibernate.orm:hibernate-jfr`
|===

You might also add the Hibernate {enhancer}[bytecode enhancer] to your
Expand Down
11 changes: 11 additions & 0 deletions documentation/src/main/asciidoc/introduction/Tuning.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<statistics,metrics>> 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

Expand Down
Loading