All Products
Search
Document Center

Application Real-Time Monitoring Service:Log analysis

Last Updated:Sep 04, 2026

When a business exception occurs, you can analyze business logs to pinpoint the root cause. The Log Analysis feature helps you analyze logs from Simple Log Service (SLS) or logs collected directly. This topic describes how to enable Log Analysis and analyze logs from SLS.

Prerequisites

Step 1: Associate business logs

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

  2. On the Application List page, select the region in the top navigation bar and then click the name of the application.

    Note

    Icons in the Language column have the following meanings:

    • Java icon: a Java application connected to Application Monitoring.

    • image: a Golang application connected to Application Monitoring.

    • image: a Python application connected to Application Monitoring.

    • -: an application connected to Managed Service for OpenTelemetry.

  3. In the left-side navigation pane, click Application Settings, and then click the Custom Configurations tab.

  4. On the Custom Configurations tab, in the Log Collect Configuration section, turn on the Link Business Logs with TraceId switch, select the region where your Simple Log Service project is located, and then bind the project and logstore.

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

Step 2: Query and analyze logs

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

  2. On the Application List page, select the region in the top navigation bar and then click the name of the application.

    Note

    Icons in the Language column have the following meanings:

    • Java icon: a Java application connected to Application Monitoring.

    • image: a Golang application connected to Application Monitoring.

    • image: a Python application connected to Application Monitoring.

    • -: an application connected to Managed Service for OpenTelemetry.

  3. In the left-side navigation pane, choose Application Diagnostics > Log Analysis.

  4. On this page, perform the following steps:

    1. In the search box, enter a query and analysis statement.

      A query and analysis statement consists of a search query and an analysis statement, separated by a vertical bar (|): Search Query | Analysis Statement. For more information about the syntax, see Query syntax and functions and SQL analysis syntax.

    2. Set a time range for the query and analysis.

      You can specify a relative time range, a whole-hour time range, or a custom time range.

      Note

      Query results may have a latency of up to 1 minute.

    3. Click Search & Analyze to view the results.

    The query and analysis results show log entries corresponding to the trace ID. For example, the fourth entry, an INFO-level log recorded at 09-09 14:10:07, indicates that the registration of RegisterPromClusterServlet failed. It reports a java.lang.RuntimeException with the error message Failed to create grafana folder, and its stack trace points to calls involving GrafanaConfigService.

Related documents

You can associate trace IDs from your traces with business logs. When an issue occurs, this correlation lets you use a trace ID to quickly find the relevant logs, which speeds up troubleshooting and root cause analysis. For more information, see Associate trace IDs with business logs for Java applications.