Skip to content

Commit 99ba76f

Browse files
authored
Introduces a new document metric name dlq_routed to count the events that are routed to DLQ. (#1090)
Introduces a new document metric name :dlq_routed to be incremented every time an event is routed into DLQ.
1 parent f69df56 commit 99ba76f

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
## 11.10.0
2+
- Feature: expose `dlq_routed` document metric to track the documents routed into DLQ [#1090](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1090)
3+
14
## 11.9.3
25
- DOC: clarify that `http_compression` option only affects _requests_; compressed _responses_ have always been read independent of this setting [#1030 ](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1030)
36

47
## 11.9.2
5-
- Fix broken link to Logstash Reference [#1085](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1085)
8+
- Fix broken link to Logstash Reference [#1085](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1085)
69

710
## 11.9.1
811
- Fixes a possible infinite-retry-loop that could occur when this plugin is configured with an `action` whose value contains a [sprintf-style placeholder][] that fails to be resolved for an individual event. Events in this state will be routed to the pipeline's [dead letter queue][DLQ] if it is available, or will be logged-and-dropped so that the remaining events in the batch can be processed [#1080](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1080)

lib/logstash/plugin_mixins/elasticsearch/common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def submit(actions)
273273
next
274274
elsif @dlq_codes.include?(status)
275275
handle_dlq_response("Could not index event to Elasticsearch.", action, status, response)
276-
@document_level_metrics.increment(:non_retryable_failures)
276+
@document_level_metrics.increment(:dlq_routed)
277277
next
278278
else
279279
# only log what the user whitelisted

logstash-output-elasticsearch.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-elasticsearch'
3-
s.version = '11.9.3'
4-
3+
s.version = '11.10.0'
54
s.licenses = ['apache-2.0']
65
s.summary = "Stores logs in Elasticsearch"
76
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"

spec/integration/outputs/metrics_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
end
5959

6060
it "increases number of successful and non retryable documents" do
61-
expect(document_level_metrics).to receive(:increment).with(:non_retryable_failures).once
61+
expect(document_level_metrics).to receive(:increment).with(:dlq_routed).once
6262
expect(document_level_metrics).to receive(:increment).with(:successes).once
6363
subject.multi_receive(bulk)
6464
end

0 commit comments

Comments
 (0)