All Products
Search
Document Center

Managed Service for OpenTelemetry:Log association

Last Updated:Jul 19, 2024

If an exception occurs in your application, you can use logs to accurately identify the exception. This topic describes how to associate logs in Simple Log Service with Trace Explorer of Managed Service for OpenTelemetry.

Prerequisites

  • The data of the application that you want to monitor is reported to Managed Service for OpenTelemetry. For more information, see Connection Description.

  • A Simple Log Service project is created. For more information, see the Create a project section of the "Manage a project" topic.

  • A Logstore is created. For more information, see the Create a Logstore section of the "Manage a Logstore" topic.

  • Trace data is collected and imported to Simple Log Service. For more information, see Data collection overview.

Associate logs with traces

Log sources

You need to collect application logs to Simple Log Service and associate the application with the Simple Log Service project and Logstore in the Managed Service for OpenTelemetry console. Pages of the Simple Log Service console are embedded in the Managed Service for OpenTelemetry console to help you analyze logs.

Associate business logs

  1. Log on to the Managed Service for OpenTelemetry console.

  2. In the left-side navigation pane, choose System Configuration > Log Association. In the top navigation bar, select a region.

    Note

    On the Log Association page, view the applications that are associated with the Simple Log Service Logstore and the corresponding associations. You can click Edit or Delete in the Actions column to change or delete an association.

  3. On the Log Association page, click Create to associate the application with the Simple Log Service Logstore.

  4. In the Add Log Association dialog box, select one or more applications that you want to associate with the Logstore, configure the Region, Log Service Project, Log Service Logstore, and Associated Index parameters, and then click OK.

    image.png

Query and analyze logs

  1. In the left-side navigation pane, click Trace Explorer.

  2. In the trace list, find the trace that you want to manage and click Logs in the Actions column. On the Log Query page, view the business logs that are associated with the trace.image.png