A HikariCP MetricsTrackerFactory that generates JFR events.
This project requires Java 11 based on OpenJDK or later and HikariCP 5+.
<dependency>
<groupId>com.github.marschall</groupId>
<artifactId>hikari-jfr</artifactId>
<version>1.0.1</version>
</dependency>
HikariConfig hikariConfig = ...
hikariConfig.setMetricsTrackerFactory(new JfrMetricsTrackerFactory());
The duration of the events is always 0, instead the duration is stored in an additonal column.
The following events are supported
- Connection Created
- A physical connection was created. It has the following attributes
- Pool Name
- The name of the connection pool
- Creation Time
- The time it took to create a physical connection
- Connection Acquired
- A connection was acquired from the pool. It has the following attributes
- Pool Name
- The name of the connection pool
- Acquisition Time
- The time it took to acquire a connection from the pool
- Connection Borrowed
- A connection was borrowed from the pool. It has the following attributes
- Pool Name
- The name of the connection pool
- Borrowed Time
- The time the connection was borrowed from the pool
- Connection Timeout
- A could not be acquired in the request time from the pool. It has the following attributes
- Pool Name
- The name of the connection pool