Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.
This repository was archived by the owner on May 14, 2025. It is now read-only.

Hibernate statistics are not exposed even if corresponding configuration are applied #4791

@klopfdreh

Description

@klopfdreh

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions