Application stuttering is difficult to be troubleshooted. Application Monitoring of Application Real-Time Monitoring Service (ARMS) provides various features, such as continuous profiling, trace diagnostics, and interface monitoring, to help you locate all slow calls in an application and fix application stuttering.
Background information
Website stuttering and slow web page loading are among the most common problems of applications. Troubleshooting is complex and time-consuming due to the following reasons:
Long application traces
Application stuttering can happen anywhere from the frontend web page to the backend gateway, or from the web application server to the backend database.
Applications that use microservice architecture have even more complex traces, and components maintained by different teams and personnel. This makes troubleshooting more difficult.
Incomplete or low-quality logs
Troubleshooting production environment problems relies on application logs. However, the locations of problems are usually unpredictable, and slow responses frequently occur. To troubleshoot slow responses, you need to print logs where errors may occur and record each call. However, this incurs huge costs.
Insufficient monitoring
Rapid business development and fast application iteration lead to frequent interface changes of applications and increased dependencies. This further deteriorates the quality of code. Applications need a comprehensive monitoring system that automatically monitors every interface and records abnormal calls.
Solution
You can install an ARMS agent to monitor all slow calls of your application by using features such as continuous profiling, trace diagnostics, and interface monitoring without modifying the application code.
Step 1: Install an ARMS agent
Before you can monitor an application, you must install an ARMS agent. Select one of the following methods to install an ARMS agent. For more information, see Application Monitoring overview.
Step 2: Query slow SQL queries
The ARMS agent collects and shows the average response time, total number of requests, the number of errors, the number of real-time instances, full garbage collection (GC) occurrences, the number of slow SQL queries, the number of exceptions, and the number of slow calls of an application within the specified time period. The ARMS agent also shows how these metrics change on a day-over-day and week-over-week basis. Perform the following steps to query slow SQL queries:
Log on to the ARMS console. In the left-side navigation pane, choose .
On the Application List page, select a region in the top navigation bar and click the name of the application that you want to manage.
NoteIf the icon is displayed in the Language column, the application is connected to Application Monitoring. If a hyphen (-) is displayed, the application is connected to Managed Service for OpenTelemetry.
On the Application Overview page, click the Overview tab. On the Overview tab, the total number of slow SQL queries and how the number changes from the previous day and previous week are displayed.
Step 3: Identify slow calls
On the Interface Invocation page, all interfaces provided by the application, and the number of calls and duration of each interface are displayed. Slow interfaces are marked to facilitate the troubleshooting.
In the left-side navigation pane, click Interface Invocation.
In the left-side navigation page of the Interface Invocation page, click a slow interface to view its details.
Step 4: Locate the faulty code
After you locate a slow interface, you must locate the faulty code to fix the interface. A snapshot is a complete record of an entire trace, including the code and duration of each call, and helps you precisely locate the faulty code.
On the right side of the Interface Invocation page, click the Interface snapshot tab.
The Interface snapshot tab displays all traces of the interface.
On the Interface snapshot tab, click a trace ID.
In the panel that appears, view the trace information. In the Details column, click the Magnifier icon to view the method stacks and context information.
NoteFor information about how to query a trace, see Trace query.
At this point, the causes of a specific slow call are revealed. This way, you can optimize the code later. Return to the Interface Invocation page to troubleshoot other slow calls in the list and fix them one by one.
References
You can configure alerting for one or more interfaces. This way, alert notifications are sent to the O&M team when exceptions occur. For more information, see Application Monitoring alert rules.