Skip to content

Commit af679e1

Browse files
committed
mention Hibernate JFR in the Short Guide
1 parent 597f74f commit af679e1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

documentation/src/main/asciidoc/introduction/Configuration.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ and `com.github.ben-manes.caffeine:jcache`
121121
or `org.eclipse:yasson`
122122
| <<spatial,Hibernate Spatial>> | `org.hibernate.orm:hibernate-spatial`
123123
| <<envers,Envers>>, for auditing historical data | `org.hibernate.orm:hibernate-envers`
124+
| <<jfr,Hibernate JFR>>, for monitoring via Java Flight Recorder | `org.hibernate.orm:hibernate-jfr`
124125
|===
125126

126127
You might also add the Hibernate {enhancer}[bytecode enhancer] to your

documentation/src/main/asciidoc/introduction/Tuning.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,17 @@ long publisherCacheMissCount =
992992
Hibernate's statistics enable observability.
993993
Both {micrometer}[Micrometer] and {smallrye-metrics}[SmallRye Metrics] are capable of exposing these metrics.
994994

995+
[[jfr]]
996+
=== Using Java Flight Recorder
997+
998+
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].
999+
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.
1000+
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_.
1001+
1002+
No special configuration is required to use Hibernate JFR.
1003+
Just include `org.hibernate.orm:hibernate-jfr` as a runtime dependency.
1004+
In particular, you _don't_ need to enable `hibernate.generate_statistics`.
1005+
9951006
[[slow-queries]]
9961007
=== Tracking down slow queries
9971008

0 commit comments

Comments
 (0)