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

There are no metrics jvm_* in the actuator/prometheus #26944

Closed
Monax111 opened this issue Jun 17, 2021 · 3 comments
Closed

There are no metrics jvm_* in the actuator/prometheus #26944

Monax111 opened this issue Jun 17, 2021 · 3 comments
Labels
status: duplicate A duplicate of another issue

Comments

@Monax111
Copy link

After update Spring(2.4.2 -> 2.5.0) i can't see jvm metric by url
http://localhost:8080/application/actuator/prometheus
dependency report: https://scans.gradle.com/s/aof3kiwqv7mae
i start debugging and found some interesting:
MeterRegistryPostProcessor.postProcessAfterInitialization() - condition if (bean instanceof MeterRegistry) is never true.
I think problem in order. I mark some breakPoint:

  1. created bean MeterRegistryPostProcessor.
  2. execute method AbstractAutowireCapableBeanFactory.doCreateBean for bean PrometheusMeterRegistry
    2.1) created bean PrometheusMeterRegistry
    2.2) execute initializeBean() witch execute method applyBeanPostProcessorsBeforeInitialization(). In debbug mode i see, then in list of beanPostProcessor do not contains MeterRegistryPostProcessor
    proof:
    image
    2.3) MeterRegistryPostProcessor.postProcessAfterInitialization() do not execute on bean PrometheusMeterRegistry.
  3. Execute AbstractBeanFactory.addBeanPostProcessors() and in debuggin mode i see than MeterRegistryPostProcessor add to context
    image

How i undersend problem: MeterRegistryPostProcessor do not add to context before created bean PrometheusMeterRegistry

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 17, 2021
@bclozel
Copy link
Member

bclozel commented Jun 17, 2021

Is there a chance this is a duplicate of #26630 ?
Could you check if 2.5.1 solves the issue in your application?

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Jun 17, 2021
@Monax111
Copy link
Author

yep. With 2.5.1 it's work

@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Jun 17, 2021
@snicoll
Copy link
Member

snicoll commented Jun 17, 2021

Thanks for following up.

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

No branches or pull requests

4 participants