Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tap): Don't send events if output is empty #21143

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/vector-tap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ impl<'a> TapRunner<'a> {
)
})
.collect();
if output_events.is_empty() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than this, would it be possible for the channel receiver to be able to handle an empty list of events? Just wondering if you'd considered and discarded that option already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is the buffer size of the channel, if it's too small then the async channel output type will have issues. Though now that I'm thinking about it, this might not be the ideal solution. Let me do some further investigation

continue
}

match &self.output_channel {
OutputChannel::Stdout(formatter) => {
Expand Down
Loading