Updated on 2025-08-19 GMT+08:00

Configuring a Custom Log Trace ID

You can configure a custom log trace ID and record a specific header field in requests or responses to the custom_traceid field in the log.

This function is under open beta test (OBT). You can submit a service ticket to enable it.

Constraints

This function is not supported if Cloud Mode - Load balancer access mode is in use.

Prerequisites

You have connected your website to WAF using Cloud Mode - CNAME or Dedicated Mode. For details, see Connecting Your Website to WAF with Cloud Mode - CNAME Access and Connecting Your Website to WAF with Dedicated Mode.

Configuring a Custom Log Trace ID

  1. Log in to the WAF console.
  2. Click in the upper left corner and select a region or project.
  3. (Optional) If you have enabled the enterprise project function, in the upper part of the navigation pane on the left, select your enterprise project from the Filter by enterprise project drop-down list. Then, WAF will display the related security data in the enterprise project on the page.
  4. In the navigation pane on the left, click Website Settings.
  5. On the Website Settings page, click the target website domain name.
  6. In the Advanced Settings area, click Modify under Custom Log Trace ID, specify Type, and configure Custom Parameters.

    Figure 1 Custom Log Trace ID

    After the above configuration is complete, access the protected website and check whether the custom_traceid field is displayed in the access logs in LTS and whether the value of the field is the configured value. For details about how to view access logs in LTS, see Using LTS to Log WAF Activities.