Having metrics about database is very important. JDBC level metrics would be very nice like:
The total number of database reads
The total number of database writes
Number of reads per second (per minute, 5 minutes & 15 minutes)
Number of writes per second (per minute, 5 minutes & 15 minutes)
Average/median/percentile query times for reads & for writes
Here is a sample project:
https://github.com/soulgalore/jdbcmetrics
This one seems also very usabe
I like the layered approach of metrics-sql (apply at either driver, connection, or datasource level).
@ohr this is fantastic. Thanks for sharing.
I have a demo that uses a forked version of the metrics-sql library mentioned above to get metrics in micrometer format.
https://github.com/pjfanning/slick-micrometer
I haven't modified the metrics to use micrometer tags yet.
@cemo https://spring.io/blog/2018/03/16/micrometer-spring-boot-2-s-new-application-metrics-collector - hikaricp has support for gathering micrometer metrics
@pjfanning It is metrics for connection pool not JDBC.
@cemo if you want jdbc metrics, see my comment about slick-micrometer sample
Thanks I will take a look.
@pjfanning nice job.
Brave's py6spy adds some instrumentation to the DB in terms of tracing - https://github.com/openzipkin/brave/tree/master/instrumentation/p6spy
FlexyPool has flexy-micrometer-metrics module.
https://github.com/vladmihalcea/flexy-pool
here is a metrics list.
https://github.com/vladmihalcea/flexy-pool/wiki/User-Guide#metrics