All Products
Search
Document Center

Managed Service for OpenTelemetry:Enable Tracing Analysis for NGINX Ingresses

Last Updated:May 18, 2023

You can enable Tracing Analysis for NGINX Ingresses in a Container Service for Kubernetes (ACK) cluster. Tracing data is imported to the Tracing Analysis console. You can view traces and the trace topology in the Tracing Analysis console. This topic describes how to enable Tracing Analysis for NGINX Ingresses.

Prerequisites

Background information

Tracing Analysis provides various features for distributed applications, including trace mapping, request counting, and trace topology. These features allow you to analyze and diagnose the performance bottlenecks of distributed applications, and improve the efficiency of microservice development and diagnostics. You can enable Tracing Analysis for NGINX Ingress controllers that are provided by ACK based on your requirements. After Tracing Analysis is enabled, you can view the tracing data.

Step 1: Obtain an endpoint

Obtain an endpoint. Select a client based on your requirements. In this example, a Zipkin client is used.

  1. Log on to the Tracing Analysis console.
  2. In the top navigation bar, select a region.

    Note

    The region must be the same as the region of the cluster used in Step 2: Enable Tracing Analysis for Ingresses.

  3. In the left-side navigation pane, click Cluster Configurations. Then, click the Access point information tab.

  4. Turn on Show Token. In the Related Information of the table below, click the copy icon at the end of the endpoint that you want to use.

    Note
    • We recommend that you select the endpoint of version 1.

    Endpoint: Zipkin

Step 2: Enable Tracing Analysis for Ingresses

  1. Log on to the ACK console.
  2. In the left-side navigation pane of the ACK console, click Clusters.
  3. On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.
  4. In the left-side navigation pane of the details page, choose Configurations > ConfigMaps.
  5. In the upper part of the ConfigMap page, select kube-system from the Namespace drop-down. Then, enter nginx-configuration in the Name search box and click the search icon. Find the nginx-configuration ConfigMap and click Edit in the Actions column.

  6. Configure tracing analysis.

    Edit the ConfigMap based on the client that is used. In this example, a Zipkin client is used. For more information about how to configure tracing analysis, see Preparations.

    In the Edit panel, click Add. Set Name to zipkin-collector-host. Set Value to the endpoint that you copied in Step 1: Obtain an endpoint.

    Note

    When you specify the endpoint, you must delete HTTP at the beginning of the endpoint and add a question mark (?) at the end of the endpoint. For example, if the endpoint is http://tracing-analysis-dc-hz-internal.aliyuncs.com/adapt_******_******/api/v1/spans, you must specify tracing-analysis-dc-hz-internal.aliyuncs.com/adapt_******_******/api/v1/spans?.

  7. Enable Tracing Analysis.

    Click Add. Set Name to enable-opentracing. Set Value to true. Then, click OK.

Step 3: View the tracing data

  1. Log on to the Tracing Analysis console.
  2. In the left-side navigation pane, click Applications.

  3. On the Applications page, select a region at the top of the page and click the application that you want to manage.

  4. In the left-side navigation pane of the details page, click Interface Calls. On the page that appears, click the Traces tab. You can view up to 100 traces on the tab. These traces are sorted in descending order of elapsed time. For more information about the tracing data, see View the details of span calls.