All Products
Search
Document Center

Enterprise Distributed Application Service:Log analysis

Last Updated:Jul 11, 2023

The log analysis feature allows you to use logs to accurately identify service exceptions that occur in your applications. This topic describes how to use the log analysis feature.

Limits

Log analysis is available only in Enterprise Distributed Application Service (EDAS) Professional Edition and Platinum Edition.

Step 1: Associate logs with trace IDs

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. From the Cluster Type drop-down list, select Kubernetes Cluster. Then, find the application that you want to manage and click the name in the Application Name column.

  3. In the left-side navigation pane, choose Application Settings > Application Monitoring Settings.
  4. On the Application Monitoring Settings page, click the Custom Configuration tab.
  5. In the Business Log Linking Settings section, specify whether to associate the logs of the application with trace IDs.
    Business log
    • If you enable Link Business Logs with TraceId, trace IDs are automatically generated in the logs.
    • To achieve precise positioning, you must bind projects and Logstores.
  6. On the Custom Configuration tab, click Save in the lower part.

Step 2: Query and analyze logs

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. From the Cluster Type drop-down list, select Kubernetes Cluster. Then, find the application that you want to manage and click the name in the Application Name column.

  3. In the left-side navigation pane of the application details page, choose Monitor > Application Diagnosis-Log Analysis.
  4. On the Log Analysis page, perform the following operations:
    1. Enter a query statement in the search box.
      A query statement consists of a search statement and an analytic statement in the format of Search statement|Analytic statement. For more information, see Search syntax and SQL syntax and functions.
    2. Specify a time range for the query and analysis.
      You can set a custom time range 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 that are generated 1 minute earlier than the specified start time or 1 minute later than the specified end time.
    3. Click Search & Analyze to view the query and analysis results.
    Log analysis