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

Enabling Open Tracing

WAF works with Log Tank Service (LTS) and Application Performance Management (APM) to trace links. If you enable open tracing, you can trace complete request links based on access logs to obtain the request source, nodes that the request passes through, and response time. This helps you quickly locate and resolve service problems.

Background

  • Log Tank Service (LTS)

    If you enable LTS for WAF logging, attack logs and access logs can be recorded and stored in LTS. Link tracing is only available for access logs.

  • Application Performance Management (APM)

    If you have enabled open tracing for WAF and associate WAF with an APM application, WAF can be displayed in APM tracing sequence diagram whenever requests pass through WAF and reach the origin servers. For more details, see Tracing.

LTS and APM are billed separately based on traffic. For details, see LTS Pricing Details and OpenTelemetry, SkyWalking, and Profiler Billing Items.

Constraints

Function

Constraint

Access mode restrictions

  • Cloud mode -CNAME access and dedicated mode access: This function is supported.
  • Cloud mode - Load balancer access: This function is not supported.

Region constraints

This function is supported only in CN South-Guangzhou, ME-Riyadh, and AP-Singapore. To use this function in other regions, submit a service ticket to apply for this function.

Prerequisites

Configuring Open Tracing

  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 Open Tracing area, confirm and configure Log Group and Log Stream by referring to Using LTS to Record WAF Logs.
  7. Click the open tracing switch. In the Configure Open Tracing dialog box, complete the following configurations and click OK.

    Table 1 Parameters for configuring open tracing

    Parameter

    Description

    Example Value

    Sampling Mode

    Sampling mode of open tracing. The options are Full sampling and Probabilistic sampling.

    Full sampling

    Sampling Rate

    If Sampling Mode is set to Probabilistic sampling, you need to specify Sampling Rate.

    Value range: 0.01 to 100.00. Default value: 100 (indicating that the sampling rate is 100%). You can set a lower sampling rate if required.

    100.00

    Connect to APM

    The APM application you want to associate. WAF can be displayed in APM tracing sequence diagram whenever requests pass through WAF and reach the origin servers.

    If no APM application is created, click Create APM Application and create one on the APM console. For details, see Creating an Application.

    NOTE:

    After an APM application is associated, APM is billed separately by data volume. For details about APM billing, see Billing Items for OpenTelemetry, SkyWalking, and Profiler.

    --

  8. (Optional) If this is the first time you configure tracing in LTS, modify or configure cloud structuring parsing and add log index fields in LTS.

    You need to add the following index fields: x_apm_parent_span_id, x_apm_span_id, x_apm_trace_flags, x_apm_trace_id, and x_apm_version.

    After the preceding configurations are complete, WAF can be displayed in APM tracing sequence diagram whenever requests pass through WAF and reach the origin servers.