add namespaced metrics for inputs (#5668)

This commit is contained in:
Pere Urbón 2016-07-21 17:25:29 +02:00 committed by Suyog Rao
parent 1002d50524
commit cfd331b230

View file

@ -438,7 +438,9 @@ module LogStash; class Pipeline
LogStash::FilterDelegator.new(@logger, klass, pipeline_scoped_metric.namespace(:filters), *args)
else
new_plugin = klass.new(*args)
new_plugin.metric = pipeline_scoped_metric.namespace(:inputs)
inputs_metric = pipeline_scoped_metric.namespace(:inputs)
namespaced_metric = inputs_metric.namespace(new_plugin.plugin_unique_name.to_sym)
new_plugin.metric = namespaced_metric
new_plugin
end
end