Store duration_in_millis under the 'events' section in metrics

Fixes #5472
This commit is contained in:
Jordan Sissel 2016-06-14 09:48:32 -07:00
parent 97a2f16b48
commit fdf19eab2e

View file

@ -24,8 +24,8 @@ module LogStash
namespaced_metric = metric.namespace(@filter.plugin_unique_name.to_sym)
@filter.metric = metric
namespaced_metric.gauge(:name, config_name)
@metric_events = namespaced_metric.namespace(:events)
namespaced_metric.gauge(:name, config_name)
# Not all the filters will do bufferings
define_flush_method if @filter.respond_to?(:flush)
@ -38,7 +38,7 @@ module LogStash
def multi_filter(events)
@metric_events.increment(:in, events.size)
clock = @filter.metric.time(:duration_in_millis)
clock = @metric_events.time(:duration_in_millis)
new_events = @filter.multi_filter(events)
clock.stop