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

Actuator Kafka consumer metrics turned off for Spring Boot 2.2.2 version #19348

Closed
IvanIschenko opened this issue Dec 11, 2019 · 6 comments
Closed
Labels
status: invalid An issue that we don't feel is valid

Comments

@IvanIschenko
Copy link

Hi, Spring community!

Sorry if I created this issue in the wrong place.

During the update process to spring-boot 2.2.2.RELEASE version, the Actuator Kafka consumer metrics were turned off, and they were not reachable with http://localhost:8080/actuator/metrics endpoint.
The metrics are working if I explicitly specify the versions of the Actuator and Spring Boot to 2.1.9.RELEASE.
I would appreciate if someone will have a look at the problem.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 11, 2019
@wilkinsona
Copy link
Member

Kafka metrics should work the same with 2.2 as they did with 2.1. To help us to investigate why that is apparently not the case, can you please provide a small sample application that reproduces the problem?

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Dec 11, 2019
@IvanIschenko
Copy link
Author

Of course, I am using the following dependencies:

  • spring-boot-starter-parent 2.2.2.RELEASE
  • spring-boot-starter-actuator 2.2.2.RELEASE (auto-configured)
  • org.springframework.kafka.spring-kafka 2.3.4.RELEASE (auto-configured)
  • org.apache.kafka.kafka-streams 2.3.1 (auto-configured)
  • org.apache.kafka.kafka-clients 2.3.1 (auto-configured)

So I have just created a simple Kafka Stream API application.
And when I am accessing http://localhost:8080/actuator/metrics in the metrics list I can not see Kafka one. But when I used spring-boot-starter-parent 2.1.9.RELEASE (all other dependencies were auto-configured) in the metrics list were Kafka consumer metrics.

@wilkinsona
Copy link
Member

Thanks. Can you please turn that information into a small sample application that we can run? You can share it with us by zipping it up and attaching it to this issue or by pushing it to a separate repository on GitHub.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-feedback We need additional information before we can continue labels Dec 11, 2019
@dreis2211
Copy link
Contributor

dreis2211 commented Dec 11, 2019

Sorry to hijack this. Isn't that caused by JMX not being enabled by default anymore in 2.2? KafkaMetricsAutoConfiguration is checking for an MBeanServer that isn't available when JMX is turned off. @IvanIschenko Can you try adding spring.jmx.enabled=true as a configuration property?

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Dec 11, 2019
@wilkinsona
Copy link
Member

Ah, yes, thanks @dreis2211. That'll be what it is. I'd overlooked the side-effect of JMX now being disabled by default.

@IvanIschenko If this doesn't help, please provide the sample that I asked for above and we can re-open the issue and take another look.

@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Dec 11, 2019
@IvanIschenko
Copy link
Author

Thanks @dreis2211 @wilkinsona for your help! Now it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants