From c15738195ca8092312bf0e266050dd09da9b803e Mon Sep 17 00:00:00 2001 From: "Dr. Dirk Richter" Date: Fri, 9 Aug 2019 13:49:37 +0200 Subject: [PATCH] avoid log event duplication (fixes #4) --- lib/logstash/filters/transaction_time.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/logstash/filters/transaction_time.rb b/lib/logstash/filters/transaction_time.rb index 6a55727..e697a96 100644 --- a/lib/logstash/filters/transaction_time.rb +++ b/lib/logstash/filters/transaction_time.rb @@ -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