Exposed again the pipelines queue.data and queue.capacity subdocuments for _node/stats

Avoid to reassing the subdocument for queue metrics preferring a merge
With PR #10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.

Fixes #11970
This commit is contained in:
andsel 2020-05-25 18:08:40 +02:00 committed by Andrea Selva
parent f3f6ca049f
commit 24d60b81c2

View file

@ -167,7 +167,7 @@ module LogStash
# if extended_stats were provided, enrich the return value # if extended_stats were provided, enrich the return value
if extended_stats if extended_stats
ret[:queue] = extended_stats["queue"] if extended_stats.include?("queue") ret[:queue].merge!(extended_stats["queue"]) if extended_stats.include?("queue")
ret[:hash] = extended_stats["hash"] ret[:hash] = extended_stats["hash"]
ret[:ephemeral_id] = extended_stats["ephemeral_id"] ret[:ephemeral_id] = extended_stats["ephemeral_id"]
if opts[:vertices] && extended_stats.include?("vertices") if opts[:vertices] && extended_stats.include?("vertices")