-
Notifications
You must be signed in to change notification settings - Fork 590
Hibernate statistics are not exposed even if corresponding configuration are applied #4791
Comments
Because the statistics generation of hibernate has been moved to the hibernate project I am going to try this out and report back if this is working. |
Good news - that was the issue here - see the result: Just add the following dependency to the pom.xml (https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server/pom.xml) <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-micrometer</artifactId>
</dependency> application.yml: spring:
jpa:
properties:
hibernate:
generate_statistics: true |
Awesome find @klopfdreh ! Thanks for this. We will also make sure we have test coverage in this area of the metrics so that we find it before it goes out. |
@klopfdreh previously were the stats automatically exposed or did you have to set the |
@onobc it’s a long time ago when I configured our environment, but I set the property directly from beginning because I thought this needs to be configured. I didn’t test it without set this property. But what I noticed is that even if I set the property it stopped working to expose the statistics which was the reason for me to investigate this issue. I would suggest to not expose the statistics by default, because it has some impacts to the server runtime. |
Agreed. I will add the dependency but users can opt-in by setting the property. |
- Source: spring-cloud-dataflow/main (1354167b644c651fbe6b6c9f96d0de8c1833c9f4) See https://github.com/spring-cloud/spring-cloud-dataflow/issues/4791\
- Source: spring-cloud-dataflow/main (1354167b644c651fbe6b6c9f96d0de8c1833c9f4) See https://github.com/spring-cloud/spring-cloud-dataflow/issues/4791\
Closed via fab9354 |
Description:
As mentioned in the title, the hibernate statistics are not exposed even if I set the property
spring.jpa.properties.hibernate.generate_statistics=true
in the application.yaml / application.propertiesRelease versions:
2.9.1
Steps to reproduce:
yaml-example:
hibernate_query_executions_max_seconds
.Note: I double checked if "spring" is applied on the same level as server and management.
Note2: This was working till version 2.9.0
The text was updated successfully, but these errors were encountered: