The real-time log delivery feature allows you to collect logs that are generated by Dynamic Route for CDN (DCDN) accelerated domain names in real time and deliver the collected logs to Log Service for analysis. This helps you monitor and identify business issues in an efficient manner. This topic describes how to enable the real-time log delivery feature.

Prerequisites

  • A domain name is added. For more information, see Add a domain name.
  • Log Service is activated.

Procedure

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, choose Data Center > Logs > Real-time Logs.
  3. Enable the real-time log delivery feature.
    The first time you use the real-time log delivery feature, enable the feature as prompted in the DCDN console. DCDN real-time logs
  4. On the Real-time Logs page, perform the following steps to enable the real-time log delivery feature.
    1. On the Real-time Logs page, click Create Delivery Project.
    2. In the Create Real-time Log Delivery Project dialog box, set the parameters and click Next. The following table describes the parameters.
      Parameter Description
      Project Name The project name is used to identify the delivery project and must be unique among other existing projects.
      Log Field Select log fields that you want to include in each real-time log. For more information, see Log fields.
      Sampling Rate Specify the percentage of the log entries that you want to deliver to Log Service. Valid values: 0 to 100%.
      Note The number of log entries to be delivered is approximately equal to the product of the number of full log entries and the specified sampling rate. If you want to deliver all log entries, set the Sampling Rate parameter to 100%.
    3. In the Create Real-time Log Delivery Project dialog box, specify regions for the Collected From and Delivered To parameters, and then click Next.
      Notice After you create a delivery project for real-time logs, you cannot change the values of the Collected From and Delivered To parameters. If you want to change the values, you must delete the delivery project that you created and create another project.
      Parameter Description
      Collected From The region from which logs are collected.
      Delivered To The region where the Log Service project resides. Log Service creates a project in the specified region to manage real-time logs.
      Authorize The first time you create a delivery project, you must authorize DCDN to assume the AliyunServiceRoleForDCDNRealTimeLogDelivery service-linked role to access Log Service resources. For more information, see SLR for real-time logs.

      DCDN real-time logs are collected and then delivered to a project that resides in the specified region for storage. The following table describes the regions that are supported by the real-time log delivery feature.

      Collected from Delivered to
      Mainland China
      • China (Hangzhou)
      • China (Shanghai)
      • China (Qingdao)
      • China (Beijing)
      • China (Zhangjiakou)
      • China (Shenzhen)
      Europe Germany (Frankfurt)
      US US (Silicon Valley)
      India India (Mumbai)
      Other Country/Region Singapore (Singapore)
    4. In the Create Real-time Log Delivery Project dialog box, select domain names and click Next.

What to do next

After DCDN real-time logs are delivered to Log Service, you can query, analyze, download, ship, and transform the logs. You can also configure alert rules for the logs. For more information, see Common operations on logs of Alibaba Cloud services.