All Products
Search
Document Center

Application Real-Time Monitoring Service:Troubleshoot exceptions with traces and logs

Last Updated:Aug 14, 2026

Diagnosing business exceptions in a microservices architecture is often difficult and time-consuming. Application Real-Time Monitoring Service (ARMS) simplifies this by correlating traces with logs, which allows you to quickly pinpoint the root cause of issues and improve diagnostic efficiency.

Prerequisites

  • You have activated Simple Log Service (SLS). If not, log on to the SLS console and follow the on-screen instructions to activate the service.

  • You have created a project. For more information, see Manage projects.

  • You have created a Logstore. For more information, see Create a basic Logstore.

Background information

Before troubleshooting with traces and logs, it is helpful to understand three key concepts: metrics, tracing, and logging.

  • Metrics: Key performance metrics for your application, such as Application Service Request, Application Service Average Response Time, and Application Dependent Service Request.

  • Tracing: Represents a complete, end-to-end request path. A single trace links all related interface calls and actions within your application.

  • Logging: Refers to the detailed business logs that your application generates for each interface call and request-response action.

When an application experiences a business exception, its metric charts often show significant fluctuations. You can use these charts for a preliminary analysis. By examining the complete trace and business logs, you can precisely locate the root cause of the exception.

Associate business logs with trace ID

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

  2. Select a region in the top navigation bar and click the application.

    Note

    Icons in the Language column indicate the application's programming language:

    • Java icon: Java

    • image: Go

    • image: Python

    • - (Hyphen): an application monitored in Managed Service for OpenTelemetry

  3. In the left navigation bar, click Application Settings, and on the right side, click the Custom Configurations tab.

  4. On the Custom Configurations tab, in the Application Log Association area, select Log Service as the log source, turn on the Associate Business Logs with Trace ID switch, select the region, and then bind the project and Logstore.

    From the Associated Index drop-down list, select full-text index.

  5. In the lower-left corner of the Custom Configurations tab, click Save.

Troubleshoot exceptions with application metrics

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

  2. Select a region in the top navigation bar and click the application.

    Note

    Icons in the Language column indicate the application's programming language:

    • Java icon: Java

    • image: Go

    • image: Python

    • - (Hyphen): an application monitored in Managed Service for OpenTelemetry

  3. In the left navigation bar, click Application Overview, select Overall Analysis at the top of the page, and then select or customize the target time range in the upper-right corner.

    The Overall Analysis page displays key metrics of the target application, such as Application Service Request, Application Service Average Response Time, and Application Dependent Service Request.

  4. On the Overall Analysis page, select an application metric and drag your mouse over its line chart to select a target time range.

    This example uses the Application Service Average Response Time metric. After you select a time range, a pop-up menu displays the following options: Enter Selected Time Range, View Diagnostic Report for Selected Time Range, View Traces for Selected Time Range, and View Logs for Selected Time Range.

  5. Inspect the traces from the selected time range.

    1. Click View traces for the selected time range.

    2. In the trace list panel, select a trace record whose Status is abnormal (indicated by the Error icon), and click the trace ID value in the TraceId column.

      You can also click View Logs in the Actions column of the trace record to view the business logs at that time and analyze the cause of business exceptions.

    3. Click the Traces tab, and then in the Details column, click the Magnifying glass icon icon.

    4. Click Method Stack, find the error message on the trace details page, and hover over the error message to view the cause of the exception.

      The left side of the trace details page displays a tree of method calls with their invocation counts and durations. The right side shows exception details, including the exception type, such as java.lang.RuntimeException, and the specific error message, such as "Failed to create Grafana folder".

  6. Inspect the business logs from the selected time range.

    1. Click View Logs for the Selected Time Range.

    2. On the Log Analysis page, select the exception and error information to view the logs and locate the cause of the business exception.

      For example, you can filter log entries by using a traceId, view the exception stack trace in the log details, and locate the RegisterPromClusterServlet that threw a java.lang.RuntimeException with the root cause Failed to create Grafana folder.

Troubleshoot exceptions with interface calls

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

  2. Select a region in the top navigation bar and click the application.

    Note

    Icons in the Language column indicate the application's programming language:

    • Java icon: Java

    • image: Go

    • image: Python

    • - (Hyphen): an application monitored in Managed Service for OpenTelemetry

  3. In the left navigation bar, click Interface Invocation.

  4. On the Interface Invocation page, click the target interface in the interface list area, and then click the Call chain query tab.

  5. On the Call chain query tab, select the interface invocation records whose Status is failed (shown as Error).

    After filtering, the list displays abnormal interface call records. The table includes the Generation Time, Interface Name, Application, Duration, Status, trace ID, and Actions columns. The example shows three records with a Status of 302, and two with a duration of 2.5s. You can click View Logs in the Actions column to investigate the details of a specific call.

  6. View the trace for the interface call.

    1. In the TraceId column of the target interface invocation record, click the trace ID.

    2. Click the Traces tab, and then in the Details column, click the Magnifying glass icon icon.

    3. Click Method Stack, find the error message on the trace details page, and hover over the error message to view the cause of the exception.

      The left side of the trace details page displays a tree of method calls with their invocation counts and durations. The right side shows exception details, including the exception type, such as java.lang.RuntimeException, and the specific error message, such as "Failed to create Grafana folder".

  7. View the logs for the interface call.

    1. In the Actions column of the target interface invocation record, click View Logs.

    2. On the Log Analysis page, select the exception and error information to view the logs and locate the cause of the business exception.

      For example, you can filter log entries by using a traceId, view the exception stack trace in the log details, and locate the RegisterPromClusterServlet that threw a java.lang.RuntimeException with the root cause Failed to create Grafana folder.

Related topics

You can also create alerts to detect metric anomalies. For more information, see Application Monitoring alert rules.