All Products
Search
Document Center

Configure tracing analysis

Last Updated: Jan 11, 2021

This topic describes how to configure tracing analysis in the API Gateway console to upload tracing logs to Alibaba Cloud Tracing Analysis. Tracing Analysis provides a complete set of tools for you to map complete traces of calling services, calculate the number of requests, offer trace topologies, and analyze application dependencies. These tools help you make development and diagnosis more efficient. This feature is available for only dedicated instances.

Prerequisites

1 Authorize Tracing Analysis

1.1 Log on to the Tracing Analysis console.

1.2 On the Overview page, click Authorize Now to authorize Tracing Analysis to read and write your Log Service data.

Authorization

1.3 On the Cloud Resource Access Authorization page, select the required permissions and click Confirm Authorization Policy.

Confirm authorization1.4 After authorization, navigate through Overview > Access process > View access point information > Show Token to view the endpoint details. Save the endpoints that are displayed in the Reporting through HTTP section.

Endpoint information

2 Configure tracing analysis in the API Gateway console

2.1 Log on to the API Gateway console.

2.2 In the left-side navigation pane, choose Publish APIs > API Groups. Then, click the API group that you want to manage. The Group Details page appears. On the Group Details page, configure the settings.

Configure the traced field
  • Trace Field Location: Specify the location of the traced field. Valid values are Header and Query.

  • Trace Field Name: Specify the name of the traced field. The custom traced field is generated by the client that sends the request. API Gateway passes the custom traced field through to the backend and records the field data in the `CustomTraceId` field of the user. If the client does not provide the traced field, API Gateway sets the field to RequestId that is generated by the service itself.

  • App Name: Specify the name of the application for tracing analysis.

  • Arms Endpoint: Enter the endpoint that you obtain in section 1.4. We recommend that you use the private network endpoint for higher efficiency if the services are deployed in the same region.

  • Log Sampling Strategy: Valid values are Upload all, Percentage upload, and Fixed number of uploads per second. Select an option based on your needs.

In the Tracing Analysis console, you can view the traces of the requests that are sent after tracing analysis is configured in the API Gateway console.

For more information about how to use Tracing Analysis, see View the information about API calls.

Note

This feature is available for dedicated instances that are purchased after December 3, 2020. If your dedicated instance is purchased before December 3, 2020 and you need to use this feature, submit a ticket to upgrade your instance to the new version.