# Monitoring Thread Dumps In M3 (monitorThread)

In the default M3 mode, yCrash monitors key runtime metrics of the target application, including CPU utilization, memory usage, application logs, response time, and application health checks. These metrics provide a stable and high-level understanding of application health.

For deeper runtime diagnostics, thread dump analysis can be enabled using the monitorThread system property. Thread dumps provide detailed visibility into application thread activity, including thread states, blocked threads, deadlocks, high CPU-consuming threads, and execution bottlenecks. This level of analysis is particularly useful when troubleshooting performance degradation, thread contention issues, or application hangs.

It is important to understand that thread behavior can vary during normal application execution. Temporary thread blocking, short-lived contention, or transient spikes in activity may be acceptable depending on the workload and design of the application. When thread monitoring is enabled, yCrash may generate incidents for such short-duration or low-impact thread events. In high-concurrency environments, this can result in a larger number of reported incidents, which may increase diagnostic noise on the dashboard.

If your environment requires detailed thread-level analysis and you are comfortable with higher monitoring sensitivity, you can enable thread dump monitoring by setting the following system property:

# Configuration Details

By default monitorThread property will be disabled. To enable this property, add it in launch scripts when starting your application.

  • If you are running the yCrash server on Linux/MAC, open launch-yc-server.sh.
  • If you are running the yCrash server on Windows, open launch-yc-server.bat.

Your launch script would look something like this:

java -Xms2g -Xmx4g -DlogDir=. -DuploadDir=. -DmonitorThread=true
1

This command configures the application to monitor thread dumps.

# Disabling the Property

If monitoring thread dump is not required, the property can be omitted or set to **false:

java -Xms2g -Xmx4g -DlogDir=. -DuploadDir=. -DmonitorThread=false
1

This reverts the application to its default behavior and captures macrometrics.