This topic describes how to forward trace data from SkyWalking to Simple Log Service by using Logtail.
Prerequisites
A trace instance is created. For more information, see Create a trace instance.
Limits
Only the gRPC protocol for SkyWalking V3 is supported. The release version of SkyWalking is 8.0.0 or later.
Linux Logtail V1.0.33 or later is required, or Windows Logtail V1.0.33.0 or later is required.
Step 1: Configure data import
Log on to the Simple Log Service console.
In the Import Data section, select SkyWalking.
Select the project and the ${instance}-traces Logstore where your trace instance resides.
Create a machine group.
If a machine group is available, click Use 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.
On the ECS Instances tab, select Manually Select Instances. Then, select the ECS instance that you want to use and click Create.
For more information, see Install Logtail on ECS instances.
ImportantIf your server is an ECS instance that belongs to a different Alibaba Cloud account than Simple Log Service, a server from a third-party cloud service provider, or a server in a data center, you must manually install Linux Logtail V1.0.33 or later or Windows Logtail V1.0.33.0 or later. For more information, see Install Logtail on a Linux server or Install Logtail on a Windows server.
After you manually install Logtail, you must configure a user identifier for the server. For more information, see Configure a user identifier.
After Logtail is installed, click Complete Installation.
In the Create Machine Group step, configure the Name parameter and click Next.
Simple 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 identifier-based machine group.
Confirm that the machine group is displayed in the Applied Server Groups section and click Next.
ImportantIf you apply a machine group immediately after you create the machine group, the heartbeat status of the machine group may be FAIL. This issue occurs because the machine group is not connected to Simple Log Service. To resolve this issue, you can click Automatic Retry. If the issue persists, see What do I do if no heartbeat connections are detected on Logtail?
In the Specify Data Source step, add the following configurations and click Next.
Important${instance} indicates the ID of your trace instance. Replace the value with an actual ID. For more information, see Create a trace instance.
If the local port 11800 of your Logtail is occupied, you can replace the port with an 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. Take note of the following items:
If you are using Java Agent, replace the value of the collector.backend_service parameter. For more information, see Java Agent configuration.
If you use .net core Agent, run the
dotnet skyapm config ${service}${endpoint}
command to generate a configuration file. In this case, you must replace ${service} with an actual service name. You must replace ${endpoint} with the machine group IP address and the port number that are configured in Step 1: Configure data import. For more information, see SkyAPM-donet.If you use another agent or SDK to send data, replace the backend address with the machine group IP address and the port number that are configured in Step 1: Configure data import.
Troubleshooting
If no data is displayed on the preview page or query page after you use Logtail to collect the trace data, you can troubleshoot the errors by following the instructions that are provided in What do I do if errors occur when I use Logtail to collect logs?