Trace data alone may not reveal why a request failed or ran slowly. By associating Simple Log Service (SLS) logs with Managed Service for OpenTelemetry, you can navigate from a trace directly to the application logs generated during that operation, making it faster to identify root causes.
How log association works
Log association links an SLS Logstore to applications monitored by Managed Service for OpenTelemetry. After you configure the association, the Managed Service for OpenTelemetry console embeds the SLS log query interface so you can view correlated logs alongside trace data without switching consoles.
Setup consists of two parts:
Collect application logs into SLS -- Write application logs to an SLS Logstore.
Create a log association in the Managed Service for OpenTelemetry console -- Map each application to the SLS project and Logstore that stores its logs.
After both parts are complete, open any trace in Trace Explorer and jump to the associated logs.
Prerequisites
Before you begin, make sure that you have:
Application data reported to Managed Service for OpenTelemetry. For more information, see Connection Description
An SLS project. For more information, see the Create a project section of the "Manage a project" topic
A Logstore in the SLS project. For more information, see the Create a Logstore section of the "Manage a Logstore" topic
Trace data collected and imported to Simple Log Service. For more information, see Data collection overview
Create a log association
Log on to the Managed Service for OpenTelemetry console.
In the left-side navigation pane, choose . In the top navigation bar, select a region.
On the Log Association page, click Create.
In the Add Log Association dialog box, configure the following parameters:
Parameter Description Applications Select one or more applications to associate with the Logstore. Region Select the region where the SLS project resides. Log Service Project Select the SLS project that stores the application logs. Log Service Logstore Select the Logstore that contains the application logs. Associated Index Specify the index to associate with the applications. 
Click OK.
The new association appears on the Log Association page. To modify or remove an association, click Edit or Delete in the Actions column.
Query logs from a trace
After log association is configured, you can view correlated logs for any trace:
In the left-side navigation pane, click Trace Explorer.
In the trace list, locate the trace you want to investigate and click Logs in the Actions column. The Log Query page opens with the business logs that match the selected trace.

Related topics
Connection Description -- Report application data to Managed Service for OpenTelemetry.
Data collection overview -- Collect and ship logs to SLS.