Thread profiling provides thread-level statistics on CPU time and thread counts by type. It records and aggregates the method stack of threads every 5 minutes to reconstruct actual code execution and help you quickly pinpoint thread-related issues. If you notice high CPU utilization in your cluster or a large number of slow methods, you can use thread profiling to find the threads or methods that consume the most CPU.
This feature is currently available only for Java applications.
Prerequisites
ARMS application monitoring provides a new monitoring details page for users on the new billing plan. For more information about the new billing plan, see Billing (New).
If you have not enabled the new billing plan, click Switch to New Version on the application list page.
An agent must be installed for your application. For more information, see Application Monitoring Integration Overview.
Procedure
-
Log in to the ARMS console. In the left-side navigation pane, choose .
-
On the Application List page, select a target region at the top and then click the name of your application.
NoteThe icons in the Language column have the following meanings:
: A Java application integrated with application monitoring.
: A Go application integrated with application monitoring.
: A Python application integrated with application monitoring.-: An application integrated with Managed Service for OpenTelemetry.
-
In the top navigation bar, choose .
Analyze threads
The list on the left of the Thread Profiling page displays all application threads, allowing you to quickly find abnormal threads by their CPU time. After selecting an abnormal thread, use the charts on the right to analyze its CPU time and Number of Threads. For example, check if the total thread count per minute is excessive.

For any abnormal thread, click Method Stack to view its runtime method stack for a specified time period. For example, you can view the methods that correspond to threads in the BLOCKED state. This helps you identify specific code segments to optimize and reduce CPU utilization.

If your agent version is 2.7.3.5 or later, ARMS uses continuous profiling to provide more accurate method stack information on thread CPU usage. The following figure shows an example. For more information, see continuous profiling.

If no data appears after you click Method Stack, follow these steps to troubleshoot:
-
If your agent version is earlier than 2.7.3.5, go to the Thread Settings section on the tab and check if the Method stack for thread profiling switch is enabled. If this switch is disabled, method stack information cannot be recorded. If it is enabled, method stack information is collected every 5 minutes.
-
If your agent version is 2.7.3.5 or later, go to the Continuous profiling section on the tab and check that the main switch and the CPU hotspots switch are enabled. Both switches must be enabled to record method stack information.