Diagnose application sluggishness

Updated at:

ARMS provides continuous profiling, trace diagnostics, and interface monitoring to help you quickly identify all slow calls in your application and resolve performance bottlenecks.

Problem analysis

Slow websites and long page load times are among the most common problems for online applications. Troubleshooting these issues is complex and time-consuming for several reasons:

  • Long application traces

    • A failure at any point, from the front-end page to the back-end gateway, or from the web application server to the database, can slow down the entire system.

    • For applications built on a microservice architecture, traces are even more complex. Different components may be maintained by separate teams, which makes troubleshooting more difficult.

  • Incomplete or low-quality logs

    Application logs are a primary tool for troubleshooting issues in a production environment. However, it is difficult to predict where problems will occur, and slowness is often an intermittent issue. To find the true cause, you would need to log every call at every potential point of failure, but this approach is prohibitively expensive.

  • Insufficient monitoring

    Rapid business growth and fast iteration cycles can lead to frequent interface changes and additional dependencies, which can degrade code quality. Applications require a robust monitoring system to automatically track every interface and record problematic calls.

Solution

After you install the ARMS agent, you can use Application Monitoring features such as continuous profiling, trace diagnostics, and interface monitoring to detect all slow calls without changing your code.

Step 1: Install the ARMS agent

Install the ARMS agent for your application to enable monitoring. Choose an installation method based on your requirements. For detailed instructions, see Get started with Application Monitoring.

Step 2: View statistics for slow SQL queries

After the ARMS agent is installed, ARMS collects and displays key metrics over a selected time period, including the total number of requests, average response time, error count, active instances, Full GC count, slow SQL query count, exception count, and slow call count. Week-over-week and day-over-day comparisons are also available.

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application > Applications.

  2. On the Applications page, select your target region at the top and then click the name of your target application.

    Note

    The icons in the Language column have the following meanings:

    Java图标: A Java application integrated with Application Monitoring.

    image: A Go application integrated with Application Monitoring.

    image: A Python application integrated with Application Monitoring.

    -: An application integrated with Managed Service for OpenTelemetry.

  3. On the Application Overview page, click the Overall Analysis tab to view the total number of slow SQL queries and their week-over-week and day-over-day changes.

    概览分析

Step 3: Identify and pinpoint slow calls

On the API Call page, ARMS displays all interfaces of the monitored application, along with their call counts and response times. Slow interfaces are highlighted to help you pinpoint them.

  1. In the left-side navigation pane, click API Call.

  2. From the list on the left side of the API Call page, click a slow interface to view its details in the pane on the right.接口调用

Step 4: Analyze the trace and locate problematic code

After you identify a slow interface, use traces to locate the problematic code. Each trace provides a complete record of a single request, including the code path and time spent on each call, helping you pinpoint the exact source of the delay.

  1. On the right side of the API Call page, click the Call chain query tab.

    The Call chain query tab displays all traces for the interface.

  2. On the Call chain query tab, click the TraceId of a specific trace.

  3. In the window that appears, examine the trace information. In the Details column, click the magnifying glass icon to view the method stack and get more context about the issue.

    Note

    To learn how to find a specific trace, see Trace Query.

    At this point, you have identified the cause of a slow call in your system. This information is crucial for code optimization. You can return to the API Call page to review other slow calls in the list and resolve them one by one.

References

Instead of reactively diagnosing issues, you can use ARMS alerting to proactively create alerts for specific interfaces or your entire application and automatically notify your operations team when problems arise. To learn how to create alerts, see Application Monitoring alert rules.