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

Tomcat servlet metrics is not available anymore #1754

Closed
crmky opened this issue Dec 16, 2019 · 4 comments
Closed

Tomcat servlet metrics is not available anymore #1754

crmky opened this issue Dec 16, 2019 · 4 comments
Labels
bug A general bug
Milestone

Comments

@crmky
Copy link
Contributor

crmky commented Dec 16, 2019

Seems this is a regression caused by 680f810.

The ObjectName format is something similar to:

Tomcat:j2eeType=Servlet,WebModule=//localhost/,name=default,J2EEApplication=none,J2EEServer=none

If query by Tomcat:j2eeType=Servlet,name=*, it returns nothing. I guess you probably want to modify the code from:

Set<ObjectName> objectNames = this.mBeanServer.queryNames(new ObjectName(getJmxDomain() + ":" + key + "=" + value + ",name=*"), null);

to:

Set<ObjectName> objectNames = this.mBeanServer.queryNames(new ObjectName(getJmxDomain() + ":" + key + "=" + value + ",name=*,*"), null);
@izeye
Copy link
Contributor

izeye commented Dec 16, 2019

@crmky Thanks for the report and sorry for the inconvenience. It seems that you're right. I created #1755 to try to fix it.

izeye added a commit to izeye/micrometer that referenced this issue Dec 16, 2019
@shakuzen shakuzen added the bug A general bug label Dec 16, 2019
@shakuzen shakuzen added this to the 1.1.10 milestone Dec 16, 2019
@shakuzen
Copy link
Member

Thanks for the report @crmky and thank you for the quick pull request @izeye. I'm wondering why our tests didn't catch this before. Or was the NotificationListener still working even when the immediate registration failed due to the query always returning nothing?

@izeye
Copy link
Contributor

izeye commented Dec 16, 2019

@shakuzen There seems to be missing coverage which has been added in #1755.

@shakuzen
Copy link
Member

There seems to be missing coverage which has been added in #1755.

I see. It was only an issue for the Servlet metrics. Thank you for improving the coverage!

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

No branches or pull requests

3 participants