All Products
Search
Document Center

Application Real-Time Monitoring Service:Analyze logs collected by Simple Log Service

Last Updated:Mar 10, 2026

When a service exception occurs, trace data shows *where* the problem happened but not *why*. By linking your application's business logs with trace IDs, you can jump from a slow or failed trace directly to the relevant log entries and pinpoint the root cause.

The log analysis feature allows you to analyze logs collected by Simple Log Service (SLS) or Application Real-Time Monitoring Service (ARMS). This topic describes how to analyze the logs collected by SLS. After you associate a Logstore with your ARMS application, the Log Analysis page lets you search and filter logs in the context of specific traces.

How it works

  1. Your application writes business logs to an SLS Logstore.

  2. You enable the Link Business Logs with TraceId toggle in ARMS, select the region where the SLS project resides, and associate the project with the Logstore.

  3. On the Log Analysis page, you search logs by keyword, trace ID, or analytic expression and view results correlated with trace data.

Prerequisites

Before you begin, make sure that you have:

Associate business logs with trace IDs

  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 a region in the top navigation bar and click the application name.

    Note

    If the Java icon icon appears in the Language column, the application is connected to Application Monitoring. A hyphen (-) indicates the application is connected to Managed Service for OpenTelemetry.

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

  4. In the Log Collect Configuration section, turn on Link Business Logs with TraceId. Select the region where the SLS project resides and associate the project with the Logstore.

  5. Click Save in the lower-left corner of the Custom Configuration tab.

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 a region in the top navigation bar and click the application name.

    Note

    If the Java icon icon appears in the Language column, the application is connected to Application Monitoring. A hyphen (-) indicates the application is connected to Managed Service for OpenTelemetry.

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

  4. Enter a query statement in the search box. A query uses the format Search statement | Analytic statement. For example: For the full query syntax, see Search syntax and Function overview.

    GoalQuery example
    Filter by keyworderror
    Combine a search with analyticserror | SELECT COUNT(*) AS cnt
  5. Set a time range. You can specify the start time and end time in hours or accurate to the second. You can also set a time length without specifying the start time or end time.

    Note

    Query results may include logs generated up to 1 minute before or after the specified time range.

  6. Click Search & Analyze to view the results.

    Log analysis results

What's next