-
Notifications
You must be signed in to change notification settings - Fork 35
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
Added option 'keep_start_event' #35
Conversation
Guys, what about to review and merge this PR? |
@jsvd could you review this PR too? |
Would like to see this functionality as well. |
lib/logstash/filters/elapsed.rb
Outdated
# before an "end event" for a concrete ID. If it's set to `true` (default | ||
# value), the first "start event" will be used; if it's set to `false`, | ||
# the last "start event" will be used. | ||
config :keep_first_start_event, :validate => :boolean, :required => false, :default => true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather make the two possible behaviours of either keeping the first or the last start event by making this property a string:
config :keep_start_event, :validate => ['first', 'last'], :required => false, :default => 'first'`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please also document this option in the docs/index.asciidoc
file
@chermenin thanks for the changes! do you mind rebasing the PR against master and bumping the minor version + adding a changelog entry so I'll publish the plugin right away? you can find the guidelines on changelog entries in https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md#when-should-i-add-an-entry-to-the-changelogmd |
451750c
to
b1bac4e
Compare
b1bac4e
to
df7f86b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Version 4.1.0 as been published, thanks for the contribution @chermenin ! |
The option 'keep_start_event' identifies the behavior in cases when several "start events" were received before an "end event". It's boolean value. If it's set to
first
(default value), the first "start event" will be used; if it's set tolast
, the last "start event" will be used.