TsdMetricsFactory.newInstance() starts threads named [AsyncAppender-Worker-query-log-async]. When I stop the application on tomcat:
(1) From catalina log, there are two SEVERE message indicating that it has failed to stop a thread:
SEVERE: The web application [/somewebapp] appears to have started a thread named [AsyncAppender-Worker-query-log-async] but has failed to stop it. This is very likely to create a memory leak.
(2) From JConsole, method com.arpnetworking.metrics.ch.qos.logback.core.AsyncAppenderBase$Worker.run() is still active, and there are two threads with name "AsyncAppender-Worker-query-log-asnc" running.
Steps to reproduce:
(1) Use TdsMetricsFactory.newInstance() to create a new MetricsFactory when the servlet starts.
(2) Deploy and start the web application
(3) Without using the MetricsFactory, Immediately stop the deployed web application.