Skip to content

Commit

Permalink
Remove 'onFilteredOut' and 'onDroppedOnPublish' callback logs (#36399)
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 authored Aug 23, 2023
1 parent 3217ec9 commit dde4079
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Remove erroneous error log in GCPPubSub input. {pull}36296[36296]
- Fix Filebeat Cisco module with missing escape character {issue}36325[36325] {pull}36326[36326]
- Fix panic when redact option is not provided to CEL input. {issue}36387[36387] {pull}36388[36388]
- Remove 'onFilteredOut' and 'onDroppedOnPublish' callback logs {issue}36299[36299] {pull}36399[36399]

*Heartbeat*

Expand Down
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 dde4079

Please sign in to comment.