I've just generated a demo project with Spring Initializr, and I couldn't find the JVM metrics being exposed in /actuator/prometheus
endpoint.
Project/Language: Maven / Java 11 Spring Boot: 2.5.0 (jar packaging) Dependencies: - Spring Web - Spring Boot Actuator - Spring Data JPA - H2 Database - Prometheus
application.properties: management.endpoints.web.exposure.include=*
Project: demo.zip
I was able to expose the JVM metrics by either:
- Removing spring-boot-starter-data-jpa
dependency
OR
- Downgrading Spring Boot to 2.4.6
Comment From: ceccone
Just saw that it was already mentioned before. Closing as a duplicate of #26630.
Comment From: snicoll
Duplicate of #26630