From 3baefc129d027cb0556118c80e3a0ac7e43abb67 Mon Sep 17 00:00:00 2001 From: Colin Surprenant Date: Wed, 6 Jun 2018 10:51:16 -0400 Subject: [PATCH 1/2] enable periodic flushing --- lib/logstash/filters/elapsed.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/logstash/filters/elapsed.rb b/lib/logstash/filters/elapsed.rb index 9540c11..b270b16 100644 --- a/lib/logstash/filters/elapsed.rb +++ b/lib/logstash/filters/elapsed.rb @@ -109,6 +109,10 @@ class LogStash::Filters::Elapsed < LogStash::Filters::Base # to the "end event"; if it's set to `true` a new "match event" is created. config :new_event_on_match, :validate => :boolean, :required => false, :default => false + # This filter must have its flush function called periodically to be able to purge + # expired stored start events. + config :periodic_flush, :validate => :boolean, :default => true + public def register @mutex = Mutex.new From 94fd5b4c2e7c2e6edbaa4ceaede29c5889b439a7 Mon Sep 17 00:00:00 2001 From: Colin Surprenant Date: Thu, 7 Jun 2018 10:26:10 -0400 Subject: [PATCH 2/2] bump version to 4.0.5 --- CHANGELOG.md | 3 +++ CONTRIBUTORS | 1 + logstash-filter-elapsed.gemspec | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86dad34..e715cee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.0.5 + - Fixed default to true for the periodic_flush option in order for the caching expiration to work [#36](https://github.com/logstash-plugins/logstash-filter-elapsed/pull/36) + ## 4.0.4 - Update gemspec summary diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3f87191..a3c3bbe 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -9,6 +9,7 @@ Contributors: * Suyog Rao (suyograo) * karsaroth * Pere Urbón (purbon) +* Colin Surprenant (colinsurprenant) Note: If you've sent us patches, bug reports, or otherwise contributed to Logstash, and you aren't on the list above and want to be, please let us know diff --git a/logstash-filter-elapsed.gemspec b/logstash-filter-elapsed.gemspec index 60d7ac9..7898ec8 100644 --- a/logstash-filter-elapsed.gemspec +++ b/logstash-filter-elapsed.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'logstash-filter-elapsed' - s.version = '4.0.4' + s.version = '4.0.5' s.licenses = ['Apache License (2.0)'] s.summary = "Calculates the elapsed time between a pair of events" s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"