All Products
Search
Document Center

Simple Log Service:Extended plug-in: Drop Field

Last Updated:Apr 21, 2025

If you use Logtail to collect logs, you can use the processor_drop plug-in to drop log fields. This topic describes the parameters of the processor_drop plug-in and provides examples on how to configure the plug-in.

Limits

The input plug-ins for text logs and container stdout and stderr support only form configuration. Other input plug-ins support only editor configuration in JSON.

Entry point

If you want to use a Logtail plug-in to process logs, you can add a Logtail plug-in configuration when you create or modify a Logtail configuration. For more information, see Overview of Logtail plug-ins for data processing.

Configuration description

Important

Only Logtail V0.16.28 and later support the processor_drop plug-in.

Form configuration

  • Parameters

    Set the Processor Type parameter to Drop Field. Then, configure other parameters based on the following table.

    Parameter

    Description

    Drop Field

    The field to drop. You can specify multiple fields.

  • Examples

    The following example shows how to drop the aaa1 and aaa2 fields from a log:

    • Raw log

      "aaa1":"value1"
      "aaa2":"value2"
      "aaa3":"value3"
    • Logtail plug-in configuration for data processingDrop fields

    • Processing result

      "aaa3":"value3"

Editor configuration in JSON

  • Parameters

    Set the type parameter to processor_drop. Then, configure other parameters in the detail section based on the following table.

    Parameter

    Type

    Required

    Description

    DropKeys

    String array

    Yes

    The field to drop. You can specify multiple fields.

  • Examples

    The following example shows how to drop the aaa1 and aaa2 fields from a log:

    • Raw log

      "aaa1":"value1"
      "aaa2":"value2"
      "aaa3":"value3"
    • Logtail plug-in configuration for data processing

      {
        "processors":[
          {
            "type":"processor_drop",
            "detail": {
              "DropKeys": ["aaa1","aaa2"]
            }
          }
        ]
      }
    • Processing result

      "aaa3":"value3"