From 97281ba8d63d7787013085b34b2534c945943f51 Mon Sep 17 00:00:00 2001 From: mib1185 Date: Tue, 25 Oct 2022 17:43:32 +0200 Subject: [PATCH 1/2] add DropFields processor to js API --- libbeat/processors/actions/drop_fields.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libbeat/processors/actions/drop_fields.go b/libbeat/processors/actions/drop_fields.go index 293f22ab5ee..a86af73873c 100644 --- a/libbeat/processors/actions/drop_fields.go +++ b/libbeat/processors/actions/drop_fields.go @@ -31,6 +31,7 @@ import ( "github.com/elastic/beats/v7/libbeat/beat" "github.com/elastic/beats/v7/libbeat/processors" "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" conf "github.com/elastic/elastic-agent-libs/config" "github.com/elastic/elastic-agent-libs/mapstr" ) @@ -46,6 +47,8 @@ func init() { checks.ConfigChecked(newDropFields, checks.RequireFields("fields"), checks.AllowedFields("fields", "when", "ignore_missing"))) + + jsprocessor.RegisterPlugin("DropFields", newDropFields) } func newDropFields(c *conf.C) (processors.Processor, error) { From c9ee543e90396b9dfcf49957fb1f46bd9570f18e Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:31:01 +0100 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG-developer.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index 10f3de4397e..a72e880c517 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -148,6 +148,7 @@ The list below covers the major changes between 7.0.0-rc2 and main only. - Add support for multiple regions in GCP {pull}32964[32964] - Use `T.TempDir` to create temporary test directory {pull}33082[33082] - Add an option to disable event normalization when creating a `beat.Client`. {pull}33657[33657] +- Add DropFields processor to js API {pull}33458[33458] ==== Deprecated