This topic describes how to forward trace data from SkyWalking to Log Service by using Logtail.

Prerequisites

A trace instance is created. For more information, see Create a trace instance.

Limits

Only the GRPC protocol of SkyWalking V3 is supported. The release version of SkyWalking is 8.0.0 and later.

Step 1: Configure data import

  1. Log on to the Log Service console.
  2. In the Import Data section, select SkyWalking.
  3. Select the Project and the ${instance}-Traces Logstore where your trace instance resides.
  4. Create a machine group.
    • If a machine group is available, click Using Existing Machine Groups.
    • If no machine groups are available, perform the following steps to create a machine group. In this example, an Elastic Compute Service (ECS) instance is used.
      1. On the ECS Instances tab, select Manually Select Instances. Then, select the ECS instance that you want to use and click Execute Now.

        For more information, see Install Logtail on ECS instances.

        Note If you want to collect logs from self-managed clusters or servers from third-party cloud service providers, you must manually install Logtail. For more information, see Install Logtail on a Linux server or Install Logtail on a Windows server.
      2. After Logtail is installed, click Complete Installation.
      3. In the Create Machine Group step, configure Name and click Next.

        Log Service allows you to create IP address-based machine groups and custom identifier-based machine groups. For more information, see Create an IP address-based machine group and Create a custom ID-based machine group.

  5. Select the newly created machine group and move it from the Source Server Groups section to the Applied Server Groups section. Then, click Next.
    Notice If you apply a machine group immediately after it is created, the heartbeat status of the machine group may be FAIL. This issue occurs because the machine group is not connected to Log Service. In this case, you can click Automatic Retry. If the issue persists, see What do I do if no heartbeat connections are detected on Logtail?
  6. In the Specify Data Source step, add the following parameters and click Next.
    ${instance} is the ID of your trace instance. We recommend that you replace this parameter based on your actual scenario.
    Note If your Logtail local port 11800 is occupied, you can replace it with another available port.
    {
        "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
        }
    }

Step 2: Configure the SkyWalking client

Configure the SkyWalking client to send data to the address of the Logtail listener. See the following details:

  • If you are using Java Agent, replace the value of the collector.backend_service parameters. For more information, see Agent configuration.
  • If you are using .net core Agent, use the dotnet skyapm config ${service}${endpoint} command to generate the configuration file. In this case, you must replace the ${service} variable with the actual service name. You must replace the ${endpoint} variable with the machine group IP address and the port number that is configured in Step 5. For more information, see SkyAPM-donet.
  • If you are using another agent or SDK to send data, replace the backend address with the machine group IP address and the port number that is configured in Step 5.

What to do next