From b4ff162cb90c24006ceb21f69d47852b52caff36 Mon Sep 17 00:00:00 2001 From: MrWong99 Date: Thu, 2 Sep 2021 15:17:00 +0200 Subject: [PATCH] Remove unused variable in fluentd output plugin I couldn't figure out why this variable is there. If I am missing any global variables by fluentd feel free to close this PR without any notice --- clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb b/clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb index f81131d6e1fc8..e3ce5952c37bd 100644 --- a/clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb +++ b/clients/cmd/fluentd/lib/fluent/plugin/out_loki.rb @@ -343,10 +343,8 @@ def line_to_loki(record) # iterate through each chunk and create a loki stream entry def chunk_to_loki(chunk) streams = {} - last_time = nil chunk.each do |time, record| # each chunk has a unique set of labels - last_time = time if last_time.nil? result = line_to_loki(record) chunk_labels = result[:labels] # initialize a new stream with the chunk_labels if it does not exist