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

avoid log event duplication (fixes #4) #5

Merged
merged 1 commit into from
Oct 15, 2019
Merged
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
4 changes: 3 additions & 1 deletion lib/logstash/filters/transaction_time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ def filter(event)
else #End of transaction
@transactions[uid].addSecond(event,@storeEvent)
transaction_event = new_transactiontime_event(@transactions[uid], @attachData)
filter_matched(transaction_event)
if (@attach_event.eql?"none") # raise new log event iff data was not attached (avoid duplicates)
filter_matched(transaction_event)
end
yield transaction_event if block_given?
@transactions.delete(uid)
end
Expand Down