diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index b69f33cb9d1..7093e996123 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. - 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 the file path of the instance lock on the error when it's is already locked {pull}33788[33788] +- Add DropFields processor to js API {pull}33458[33458] ==== Deprecated 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) {