Skip to content

Commit

Permalink
Remove 'onFilteredOut' and 'onDroppedOnPublish' callback logs
Browse files Browse the repository at this point in the history
The 'onFilteredOut' and 'onDroppedOnPublish' callbacks debug logs can
cause an infinity loop of log entries being logged over and over again
when running under Elastic-Agent. Those log entries are removed to
prevent this from happening in the future.

The monitoring Filebeat uses a drop processor to drop its own logs,
however if log level is debug the `onFilteredOut` callback debug log
will log all dropped events, because it is done by the monitoring
Filebeat, it will be picked up, dropped and logged again, creating
this infinity loop.
  • Loading branch information
belimawr committed Aug 22, 2023
1 parent ecc82aa commit 099c2ff
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions libbeat/publisher/pipeline/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,10 @@ func (c *client) onPublished() {
}

func (c *client) onFilteredOut(e beat.Event) {
c.logger.Debugf("Pipeline client receives callback 'onFilteredOut' for event: %+v", e)
c.observer.filteredEvent()
}

func (c *client) onDroppedOnPublish(e beat.Event) {
c.logger.Debugf("Pipeline client receives callback 'onDroppedOnPublish' for event: %+v", e)
c.observer.failedPublishEvent()
if c.clientListener != nil {
c.clientListener.DroppedOnPublish(e)
Expand Down

0 comments on commit 099c2ff

Please sign in to comment.