tencent cloud

Cloud Log Service

Custom Redirect

Download
Focus Mode
Font Size
Last updated: 2026-05-14 21:52:52

Overview

For the raw log entries found on the retrieval analysis page, CLS supports custom redirection by clicking the field value for further operations, such as:
Search for related logs in other log topics based on the request_id.
Query call chain information in APM based on the TraceID.
Query user information on the internal user management platform based on the user_id.



Custom redirection supports three operation types:
Redirection type
Applicable Scenario
Open External URL
Open the specified URL and carry the designated fields from the log as parameters in the URL, for example, query user information on the internal user management platform based on user_id.
View APM trace details.
When the trace has been associated with CLS logs in APM, you can jump to the APM page via the TraceID to view trace details.
Search for other log topic
Retrieve the specified log topic and carry the designated fields from the log as retrieval conditions, for example, retrieve related logs in other log topics based on request_id.

Operation Steps

Adding custom redirection

1. Log in to the CLS console.
2. In the left sidebar, click Search and Analysis to enter the retrieval analysis page.
3. After retrieving the logs, click the field value to which you want to add a redirection. In the pop-up menu, click

to add a new redirection.


4. Enter the following configuration information in the pop-up box:
Redirection Type: Select the corresponding redirection type as required.
Trigger Field: Clicking the value of a field triggers a redirection, for example, "stgw_request_id" in the figure above.
Configuration Name: The name of the custom redirection, for example, "View Downstream Service Logs".
Other Configuration Items: Related to the jump type, see the table below for details:
Open External URL
Viewing APM Trace Details
Search for other log topic
URL: The URL address that needs to be opened, starting with http:// or https://. You can use variables in the URL to dynamically obtain log field values and other information. For example, {{__currentValue__}} represents the value currently being clicked.
Open in a new window: Whether to redirect to a new window.
Business System: Select a business system that has already been associated with CLS logs in APM.
Trace ID: Which part of the log value is the Trace ID.
Trigger Field Value: Applies when the Trace ID is a separate field.
Trigger Field Clicked Word Segmentation: Applies when the Trace ID is not a separate field but is contained within a long text. For example, in the example below, 5e72e39e55209533-1 is the Trace ID.
request [5e72e39e55209533-1] for operation PRODUCER rest demo-register-url-prefix-server.RegisterUrlPrefixEndpoint.getName begin
Open in a new window: Whether to redirect to a new window.
Log Topic: The log topic to be retrieved.
Time Range: The time range to be retrieved. It is recommended to fuse the current time range or customize it.
Continue to Use Current Search Criteria: Whether to continue to use the current search criteria.
Additional Search Criteria: Whether to add additional search criteria. You can use variables to dynamically obtain log field values and other information. For example, using stgw_request_id:{{__currentValue__}} sets the currently clicked value as a key-value search condition. When other log topics are searched, it will be automatically converted to stgw_request_id:"8da469b42947445891cc10fc55d75471" and appear in the search statement.
Open in a new window: Whether to redirect to a new window.

Editing/Deleting Custom Redirection

1. Log in to the CLS console.
2. In the left sidebar, click Search and Analysis to enter the retrieval analysis page.
3. After inquiring the logs, click to edit/delete the redirected field value. In the pop-up menu, click

Manage Custom Redirection.



4. In the pop-up window, click the name of the custom redirection configuration to edit it in the form on the right. Click

to the right of the name to delete the configuration.
5. Click Apply to save the configuration.

Variable Description

${__CurrentValue} indicates the currently clicked field value. When the field is word-segmented, this variable refers to the words after the word segmentation. For example, in the following figure, the separator / is behind kube-scheduler. When the mouse pointer is hovered, only kube-scheduler is highlighted. When a custom redirection is triggered by clicking, the corresponding ${__CurrentValue} is the kube-scheduler.



${__TopicId} indicates the current topic ID, such as a85bbd1c-233f-xxxx-aeda-70cbd9f8715a.
${__StartTime} and ${__EndTime} indicate the start and end Unix timestamps of the current query time range.
You can use ${} to enclose the field name as a variable to represent the complete value of that field. For example, in the above image, you can use ${userAgent} to represent the value of the userAgent field, ${userAgent}=kube-scheduler/v1.20.6 (linux/amd64) kubernetes/1cb721e/leader-election.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback