This topic describes how to import trace data from Apache SkyWalking to Log Service. This way, you can query and analyze the trace data by using Log Service.

Prerequisites

  • Apache SkyWalking
    • A SkyWalking agent of version 8.0.0 or later is installed in the application on which data is collected. For more information, see Setup.
  • Log Service
    • A Logstore is created. For more information, see Create a Logstore.
    • A machine group is created, and the group uses a custom identifier. For more information, see Create a custom ID-based machine group.
      Notice Make sure that the custom identifier is unique in the region of the Log Service project to which the Logstore belongs.
    • A trace instance is created. For more information, see Create a trace instance.

Background information

We recommend that you import trace data from Apache SkyWalking to Log Service. This brings the following benefits:

  • Elasticity: Log Service can handle traffic spikes in an efficient manner.
  • Performance: Log Service provides higher query performance than open source Elasticsearch. Log Service allows you to write petabytes of data per day, and returns results to queries for billions or tens of billions of data rows within seconds.
  • Stability: Log Service uses three replicas for storage, which provides 99.9% availability and 99.999999999% (eleven 9's) reliability.
  • O&M: Log Service provides an out-of-the-box feature that allows you to import Apache SkyWalking trace data. O&M is not required for Log Service. You do not need to perform O&M on servers or applications.

Procedure

The following procedure describes how to import trace data from Apache SkyWalking to Log Service:

  1. Log on to the Log Service console.
  2. In the Import Data section, click SkyWalking.
  3. In the Specify Logstore step, select the project and Logstore. Then, click Next.
  4. In the Create Machine Group step, click Use Existing Machine Groups.
  5. In the Machine Group Settings step, select the machine group that you want to use in the Source Server Groups section and move the machine group to the Applied Server Groups section. Then, click Next.
  6. In the Specify Data Source step, configure the Logtail plug-ins and click Next.
    A configuration template is provided in the Plug-in Config field. You must replace ${instance} with the ID of your trace instance.
    Note If the local port 11800 of your Logtail is occupied, you can use another available port. In this case, you must change the port that is used by Apache SkyWalking to send data.
    {
          "inputs" : [
            {
                "detail" : {
                    "Address" : "0.0.0.0:11800"
                },
                "type" : "service_skywalking_agent_v3"
            }
        ],
        "aggregators" : [
            {
                "detail" : {
                    "MetricsLogstore" : "${instance}-metrics",
                    "TraceLogstore" : "${instance}-traces"
                },
                "type" : "aggregator_skywalking"
            }
        ],
        "global" : {
            "AlwaysOnline" : true,
            "DelayStopSec" : 300
        }
    }
    Click Next to complete the Logtail configuration. Then, Log Service starts to collect logs.
    Note
    • A Logtail configuration requires no more than 3 minutes to take effect.
    • If an error occurs when a Logtail configuration is used to collect logs, follow the instructions in Diagnose collection errors to troubleshoot the error.

What to do next

After you import trace data from Apache SkyWalking to Log Service, you can perform the following operations: