logstash-output-elasticsearch 11.22.14-java → 11.22.15-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e75623d800d992610e94df0ba34b7d257e66a72fa8f1803998b78ffc6ab615b
4
- data.tar.gz: 0f38696e6980c161b1575a8625f44559ee7938d031ec89d653fd16e7c58434fa
3
+ metadata.gz: a0b7ec8d5dbede6389a4e59f97d8e98c812091e9f9a1f49ed11a443c4c7b4a6b
4
+ data.tar.gz: e0a1b09ca555fed7cd9340ce843e837b3abb0ceb0d21a577d43a3b89462042cc
5
5
  SHA512:
6
- metadata.gz: 444924d56d73f8f60612d4919c9e29391441a8d58ee7039b512f856c8eb31903f1e43ecd5818712e1aadc85f7f22cb9590d8f8fc98ffec86eca5c2c7d78a07c9
7
- data.tar.gz: ff357b4c86f4cefaf0bb2c2d591e0e9730191224c54ab7f98e5695e0f6601dc7d7423240930979751808250cc93368ccce29eb918b893ef65d4a40e6cf490425
6
+ metadata.gz: 14dd08f7aa74dee3c9cadb7ff96a86a0e65e4fcb425b1292749005faac2e7153a580ab6212dabb7664f1d83997404993ec1a2f0f9efdabd834aecd5447b728f8
7
+ data.tar.gz: 1c21dd49841e4f05ddaca95e7a3f91bb9d7e9c3ee9887249ef2b365c3066db666645b3b508a173c2c9fa55256c906fa202068b2942646cac8e2cc1e3ab444b65
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 11.22.15
2
+ - Improves the logging experience when DLQ used [#1258](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1258)
3
+
1
4
  ## 11.22.14
2
5
  - Fix: replace deprecated `File.exists?` with `File.exist?` for Ruby 3.4 (JRuby 10) compatibility [#1238](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1238)
3
6
 
@@ -241,7 +241,6 @@ module LogStash; module PluginMixins; module ElasticSearch
241
241
  @dlq_writer.write(event, "#{detailed_message}")
242
242
  else
243
243
  log_level = dig_value(response, 'index', 'error', 'type') == 'invalid_index_name_exception' ? :error : :warn
244
-
245
244
  @logger.public_send(log_level, message, status: status, action: action_params, response: response)
246
245
  end
247
246
  end
@@ -273,6 +272,7 @@ module LogStash; module PluginMixins; module ElasticSearch
273
272
  end
274
273
 
275
274
  actions_to_retry = []
275
+ dlq_routed_stats = {}
276
276
  responses.each_with_index do |response,idx|
277
277
  action_type, action_props = response.first
278
278
 
@@ -294,6 +294,11 @@ module LogStash; module PluginMixins; module ElasticSearch
294
294
  elsif @dlq_codes.include?(status)
295
295
  handle_dlq_response("Could not index event to Elasticsearch.", action, status, response)
296
296
  @document_level_metrics.increment(:dlq_routed)
297
+ if dlq_routed_stats.key?(status)
298
+ dlq_routed_stats[status][:count] += 1
299
+ else
300
+ dlq_routed_stats[status] = { :count => 1, :sample_event => { :action => action, :response => response } }
301
+ end
297
302
  next
298
303
  else
299
304
  # only log what the user whitelisted
@@ -303,6 +308,11 @@ module LogStash; module PluginMixins; module ElasticSearch
303
308
  end
304
309
  end
305
310
 
311
+ if @dlq_writer && !dlq_routed_stats.empty?
312
+ total = dlq_routed_stats.values.sum { |entry| entry[:count] }
313
+ @logger.warn("Events could not be indexed and routing to DLQ", :count => total, :dlq_routed_stats => dlq_routed_stats)
314
+ end
315
+
306
316
  actions_to_retry
307
317
  end
308
318
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-elasticsearch'
3
- s.version = '11.22.14'
3
+ s.version = '11.22.15'
4
4
  s.licenses = ['apache-2.0']
5
5
  s.summary = "Stores logs in Elasticsearch"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.22.14
4
+ version: 11.22.15
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic