All Products
Search
Document Center

:Log analysis

Last Updated:Aug 21, 2025

The log analysis feature allows you to analyze the logs collected by Simple Log Service or Cloud Monitor 2.0 to accurately identify service exceptions that occur to your application. This topic describes how to enable this feature and analyze the logs collected by Simple Log Service.

Prerequisites

Try in Playground

Alibaba Cloud Playground provides a demo environment where you can experience the main features of Cloud Monitor 2.0.

  1. Visit the Playground demo environment. By default, you are logged on to the o11y-demo-cn-hangzhou workspace.

  2. In the left navigation pane, choose Application Center > O&M and Monitoring > ARMS.

  3. On the Applications page, click an application. Then, click Trace Analysis.

Step 1: Associate business logs with Trace IDs

  1. Log on to the Cloud Monitor 2.0 console, and select a workspace. In the left navigation pane, choose Application Center > O&M and Monitoring > Application Monitoring.

  2. On the Applications page, click an application. Then, choose Application Settings > Custom Settings.

  3. In the Application Log Association section, turn on the Associate Business Logs with Trace ID switch, select the region where your Simple Log Service project is located, and associate the project with the Logstore.

  4. In the lower-left corner of the tab page, click Save.

Step 2: Query and analyze logs

  1. Log on to the Cloud Monitor 2.0 console, and select a workspace. In the left navigation pane, choose Application Center > O&M and Monitoring > Application Monitoring.

  2. On the Applications page, click an application. Then, click Trace Analysis.

  3. In the Actions column of the trace, click Logs.

  4. On the log query page, perform the following operations:

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

      A query analysis statement consists of a query statement and an analytic statement. Format: Query statement|Analytic statement. For more information about the syntax of a query analysis statement, see Query syntax and functions and Aggregate functions.

    2. Specify a time period for query.

      You can set a custom time period by specifying the start time and end time. The start time and end time can be in hours or accurate to the second. You can also set a time length without specifying the start time or end time.

      Note

      The query results may contain logs generated 1 minute earlier or later than the specified time period.

    3. Click Query/Analyze to view the query analysis results.

    Log analysis

Related step

Associate trace IDs with application logs for error identification and troubleshooting.