-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Description
Since #12550 spring-boot makes use of HibernateMetrics provided by micrometer. Since version 1.4.0 HibernateQueryMetrics is also available in micrometer, but spring-boot doesn't configure it. I suppose adding a configuration for this binder would be a great addition.
Now it's fragile to add this binder in user code, since HibernateMetricsAutoConfiguration makes some bean names transformations to get entity manager factory name. That's why I propose this change to be done on spring-boot side consistent with HibernateMetricsAutoConfiguration.
However it's worth noting that HibernateQueryMetrics most certainly will create too much Meters because of a number of queries in regular application and in a way will degrade performance. So it's important to make this auto-configuration opt-in.
I will be happy to contribute if you think this feature is worth adding.