This topic describes how to import trace data from Apache SkyWalking to Simple Log Service. This way, you can query and analyze the trace data by using Simple 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.
Simple 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 identifier-based machine group.
ImportantMake sure that the custom identifier is unique in the region of the Simple 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 Simple Log Service. This brings the following benefits:
Elasticity: Simple Log Service can handle traffic spikes in an efficient manner.
Performance: Simple Log Service provides higher query performance than open source Elasticsearch. Simple 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: Simple Log Service uses three replicas for storage, which provides 99.9% availability and 99.999999999% (eleven 9's) reliability.
O&M: Simple Log Service provides an out-of-the-box feature that allows you to import Apache SkyWalking trace data. O&M is not required for Simple 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 Simple Log Service:
Log on to the Simple Log Service console.
In the Import Data section, click SkyWalking.
In the Specify Logstore step, select the project and Logstore. Then, click Next.
In the Create Machine Group step, click Use Existing Machine Groups.
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.
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.
NoteIf 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, Simple Log Service starts to collect logs.
NoteA 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 How do I view Logtail collection errors? to troubleshoot the error.
What to do next
After you import trace data from Apache SkyWalking to Simple Log Service, you can perform the following operations: