The agent doesn’t correctly query Tomcat JMX metrics when using embedded Tomcat with SpringBoot #59
Labels
bug
Something isn't working as designed/intended
on-roadmap
Issue has been added to our product roadmap and will be worked in the coming quarter
The agent doesn’t correctly query the following Tomcat JMX metrics when using embedded Tomcat with SpringBoot:
type=DataSource
type=ThreadPool
type=Manager
We add Tomcat JMX values for the above categories if the server was started via one of the following two methods:
It appears that when using embedded Tomcat with Spring Boot
StandardServer
does get instrumented properly:By default, embedded Tomcat JMX is disabled by Spring Boot. In
application.properties
Tomcat mbeans need to be enabled by adding:server.tomcat.mbeanregistry.enabled=true
The problem though is that the Mbean group namespaces are different, standalone Tomcat uses the prefix
Catalina
for queries whereas embedded Tomcat uses the prefixTomcat
. Ourtomcat-jmx
instrumentation only queries MBeans with theCatalina
prefix thus queries initiated by embedded Tomcat fail due to an incorrect group name.Standalone Tomcat JMX:
Embedded Tomcat JMX
For now, the recommended workaround would be to utilize Custom JMX instrumentation by YAML and create a dashboard to view the metrics.
(migrate to Jira)
The text was updated successfully, but these errors were encountered: