spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

Hibernate statistics are not exposed even if corresponding configuration are applied

Open klopfdreh opened this issue 3 years ago • 0 comments

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.properties

Release versions: 2.9.1

Steps to reproduce:

  1. Just start the server and set the following properties in the application.yml / application.properties. yaml-example:
    management:
      endpoints:
        prometheus:
          enabled: true
        web:
          exposure:
            include: "*"
        jmx:
          exposure:
            include: "*"
      metrics:
        tags:
          application: scdf_server
        export:
          prometheus:
            enabled: true
            rsocket:
              enabled: true
              host: localhost
              port: 7001
    spring:
        jpa:
          properties:
            hibernate:
              dialect: <yourdialect>
              generate_statistics: true
  1. Access http://localhost:9393/management/prometheus and search for example for hibernate_query_executions_max_seconds.
  2. According to hibernate this should show the query executions max seconds, but this and other properties are not exposed.

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

klopfdreh avatar Dec 16 '21 05:12 klopfdreh