Skip to content

Commit

Permalink
Remove event fields from error log. (#37330) (#37348)
Browse files Browse the repository at this point in the history
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 3a504dd)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
  • Loading branch information
mergify[bot] and belimawr authored Dec 7, 2023
1 parent d245c14 commit 9bd7de8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion libbeat/processors/script/javascript/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 9bd7de8

Please # to comment.