Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading to version 1.13.0 endpoints are not exposed in Spring Boot with Prometheus #5106

Closed
IlyaLisov opened this issue May 16, 2024 · 3 comments
Labels
duplicate A duplicate of another issue

Comments

@IlyaLisov
Copy link

Describe the bug
I was used micrometer:1.12.6 in Spring Boot application, but yesterday upgraded to 1.13.0. After that I get message on startup: Exposing 0 endpoint(s) beneath base path '/actuator'
I only changed version, but config stayed as it was.

Environment

  • Micrometer version: 1.13.0
  • Micrometer registry: prometheus
  • OS: macOS
  • Java version: 17

To Reproduce
My application.yaml file contains this config. I changed micrometer version from 1.12.6 to 1.13.0 and started to get 0 endpoints exposed

management:
  endpoints:
    web:
      exposure:
        include: "prometheus"
  metrics:
    enable:
      request:
        enabled: true
      response:
        enabled: true
  prometheus:
    metrics:
      export:
        enabled: true

My pom.xml file contains:

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-registry-prometheus</artifactId>
        <scope>runtime</scope>
        <version>1.13.0</version>
</dependency>

Expected behavior
I expected that I don't need to change configs because of minor version was changed and there are no corresponding messages in release notes.

@shakuzen
Copy link
Member

there are no corresponding messages in release notes.

We have the following entry in the Micrometer 1.13 release notes. Perhaps the migration guide could be made more clear on Spring Boot (and other frameworks') compatibility.

Add support for Prometheus client 1.x #4846 (please see the Migration Guide)

This issue is a duplicate of #5103. It's generally best practice to use to the version of dependencies managed by Spring Boot. From your provided pom.xml snippet, I can see you are doing that for spring-boot-starter-actuator but you are not doing that for micrometer-registry-prometheus (you are overriding the version Spring Boot is managing). If you let Spring Boot manage the version, you should not have an issue. Spring Boot 3.3.0 is scheduled to be released next week, which plans to upgrade the version of Micrometer to 1.13. Being on Spring Boot 3.3 will avoid the issue you are seeing. If you would like to use Micrometer 1.13 with Spring Boot 3.2 now, see #5103 (comment).

@shakuzen shakuzen added duplicate A duplicate of another issue and removed waiting-for-triage labels May 16, 2024
@shakuzen
Copy link
Member

Duplicate of #5103

@shakuzen shakuzen marked this as a duplicate of #5103 May 16, 2024
@shakuzen shakuzen closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@IlyaLisov
Copy link
Author

Thanks @shakuzen !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants