From 331c7b1e39ca213ba7f6a7e5a92ed6398a330b30 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:26:49 -0500 Subject: [PATCH] Remove event fields from error log. (#37330) (#37349) Remove event fields from error log when the script processor panics. This is an unlikely situation to happen as the Javascript runtime we use should not panic on any error while executing Javascript code, hence the event fields are just removed. (cherry picked from commit 3a504dd1e1e9d6f0c1f5e099e87728f0fba7551b) Co-authored-by: Tiago Queiroz Co-authored-by: Craig MacKenzie --- libbeat/processors/script/javascript/session.go | 1 - 1 file changed, 1 deletion(-) diff --git a/libbeat/processors/script/javascript/session.go b/libbeat/processors/script/javascript/session.go index 337d2eae799..5b08e7d6052 100644 --- a/libbeat/processors/script/javascript/session.go +++ b/libbeat/processors/script/javascript/session.go @@ -210,7 +210,6 @@ func (s *session) runProcessFunc(b *beat.Event) (out *beat.Event, err error) { if r := recover(); r != nil { s.log.Errorw("The javascript processor caused an unexpected panic "+ "while processing an event. Recovering, but please report this.", - "event", mapstr.M{"original": b.Fields.String()}, "panic", r, zap.Stack("stack")) if !s.evt.IsCancelled() {