Issue
Is there an easy, built-in way to monitor threads of an Java app in AWS? Like thread count, running time, etc. Or do I need a profiling tool?
Can I see thread metrics in AWS X-RAY or is there a way to export JVM metrics to cloudwatch?
Solution
There is no totally built-in metric for that, but using the CloudWatch PutMetricData API it's possible to monitor anything. Some folks did that for JMX: https://github.com/mojn/jmx-cloudwatch-reporter
For Tomcat, for example, it would be
Thread Usage
JMX Bean: Catalina:type=Executor,name=[executor name]
Attributes: poolSize, activeCount
https://wiki.apache.org/tomcat/FAQ/Monitoring
X-Ray is for realtime application monitoring, with different instrumentation alternatives.
Answered By - Julio Faerman
Answer Checked By - Gilberto Lyons (JavaFixing Admin)