Skip to content

Commit

Permalink
Add logging trace at debug level for the pipeline client. (elastic#9016)
Browse files Browse the repository at this point in the history
* Add logging trace at debug level for the pipeline client.

To allow easier debugging when events are not sent by the output we
have added a few log statements at debug level for the onFilteredOut and
the onDroppedOnPublish events.
  • Loading branch information
ph committed Dec 11, 2018
1 parent 993be9c commit 465b1a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha1...master[Check the HEAD d
- Log events at the debug level when dropped by encoding problems. {pull}9251[9251]
- Refresh host metadata in add_host_metadata. {pull}9359[9359]
- When collecting swap metrics for beats telemetry or system metricbeat module handle cases of free swap being bigger than total swap by assuming no swap is being used. {issue}6271[6271] {pull}9383[9383]
- Adding logging traces at debug level when the pipeline client receives the following events: onFilteredOut, onDroppedOnPublish. {pull}9016[9016]

*Auditbeat*

Expand Down
2 changes: 2 additions & 0 deletions libbeat/publisher/pipeline/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,15 @@ func (c *client) onPublished() {
}

func (c *client) onFilteredOut(e beat.Event) {
c.pipeline.logger.Debug("Pipeline client receives callback 'onFilteredOut' for event: %+v", e)
c.pipeline.observer.filteredEvent()
if c.eventer != nil {
c.eventer.FilteredOut(e)
}
}

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

0 comments on commit 465b1a2

Please sign in to comment.