https://www.micrometer.io
Extension for MicroMeter in order to measure JDBC-related meters. It provides adapters for several connection provider types, such as java.sql.DataSource, org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, e.g.
If you just need an extension for Hibernate Statistics module, there already exist an extension within the Hibernate ORM project.
Instead of using reflection, the framework heavily utilizes the Kotlin Delegation feature. It contains several wrapper classes, for example JDBCConnection for SQL-Connections, in order to implement counters and other meters.