Skip to content

Commit

Permalink
Remove event fields from error log. (#37330)
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.
  • Loading branch information
belimawr authored Dec 7, 2023
1 parent 8a03596 commit 3a504dd
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 3a504dd

Please sign in to comment.