drop

package
v1.8.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

字段丢弃

该插件可对指定的字段(支持多个)进行丢弃。

参数说明

插件类型(type)为 processor_drop

参数 类型 必选或可选 参数说明
DropKeys array 必选 字符串数组,指定要从日志中删除的(多个)键。
示例

从日志中删除 aaa1aaa2 字段,配置详情及处理结果如下:

  • 输入
"aaa1":"value1"
"aaa2":"value2"
"aaa3":"value3"
  • 配置详情
{
  "processors":[
    {
      "type":"processor_drop",
      "detail": {
        "DropKeys": ["aaa1","aaa2"]
      }
    }
  ]
}
  • 配置后结果
"aaa3":"value3"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessorDrop

type ProcessorDrop struct {
	DropKeys []string
	// contains filtered or unexported fields
}

func (*ProcessorDrop) Description

func (*ProcessorDrop) Description() string

func (*ProcessorDrop) Init

func (p *ProcessorDrop) Init(context pipeline.Context) error

Init called for init some system resources, like socket, mutex...

func (*ProcessorDrop) ProcessLogs

func (p *ProcessorDrop) ProcessLogs(logArray []*protocol.Log) []*protocol.Log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL