tencent cloud

Feedback

Custom Definition Push Log Fields

Last updated: 2024-06-28 14:21:49
    If you need to push certain field values in HTTP Request Headers, HTTP Response Headers, or Cookies, you can precisely record such information in logs through the Custom Definition Log Field feature.
    Note:
    The Custom Definition Log Field feature is applicable only to real-time logs.

    Use Restrictions

    In the same real-time log push task, Custom Definition field names must not be duplicated;
    A maximum of 200 Custom Definition fields can be configured;
    Field names are case-sensitive and must exactly match the original field names in HTTP actions;
    Field names can be 1-100 characters long, beginning with a letter, and may include letters, numbers, and the '-' character, ending with a letter or a number;
    Currently, only Site Acceleration Logs support adding custom definition fields.

    Example: Logging the value of a specified response header

    Sample Scenario

    In some business scenarios, understanding the size of the response body is crucial for monitoring network traffic and optimizing performance. To achieve this, custom definition log fields can be configured to record the value of the Content-Length header for each response.

    Operation step

    1. Access the EdgeOne console, locate the left-hand menu, and select the Site List. Within this listing, click on the Site requiring configuration to enter its detailed page.
    2. On the Site Details Page, click Log Service > Real-time Logs.
    3. On the Real-time Logs page, click Create shipping task.
    4. On Select the log source Page, fill in the Task name, select the Log type Service area, the Domain name/Layer 4 Proxy Instance for which the logs need to be pushed, and click Next.
    5. On the Define delivery content page, click Add custom field.
    5.1 Select the field type as Response Header;
    5.2 Enter the field name as Content-Length;
    5.3 click Save.
    
    6. After configuring the destination, click Ship, confirm the cost reminder in the pop-up, and click Confirm Creation to save the configuration.

    References

    If you would like to understand the meanings of various HTTP request and response headers to decide whether to log them, please refer to HTTP Standard Header Explanation.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support