fluent-plugin-kinesis 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +41 -29
- data/CHANGELOG.md +6 -0
- data/README.md +11 -1
- data/gemfiles/Gemfile.fluentd-0.14.22 +0 -14
- data/gemfiles/Gemfile.fluentd-1.12.3 +6 -0
- data/gemfiles/Gemfile.td-agent-3.1.0 +0 -14
- data/gemfiles/Gemfile.td-agent-3.1.1 +0 -14
- data/gemfiles/Gemfile.td-agent-3.2.0 +0 -14
- data/gemfiles/Gemfile.td-agent-3.2.1 +0 -14
- data/gemfiles/Gemfile.td-agent-3.3.0 +0 -14
- data/gemfiles/Gemfile.td-agent-3.4.0 +17 -0
- data/gemfiles/Gemfile.td-agent-3.4.1 +0 -17
- data/gemfiles/Gemfile.td-agent-3.5.0 +0 -14
- data/gemfiles/Gemfile.td-agent-3.5.1 +0 -14
- data/gemfiles/Gemfile.td-agent-3.6.0 +0 -14
- data/gemfiles/Gemfile.td-agent-3.7.0 +17 -0
- data/gemfiles/Gemfile.td-agent-3.7.1 +0 -14
- data/gemfiles/Gemfile.td-agent-3.8.0 +0 -14
- data/gemfiles/Gemfile.td-agent-3.8.1 +18 -0
- data/gemfiles/Gemfile.td-agent-4.0.0 +25 -0
- data/gemfiles/Gemfile.td-agent-4.0.1 +5 -15
- data/gemfiles/Gemfile.td-agent-4.1.0 +21 -0
- data/lib/fluent/plugin/kinesis_helper/api.rb +65 -9
- data/lib/fluent_plugin_kinesis/version.rb +1 -1
- metadata +9 -4
- data/gemfiles/Gemfile.fluentd-1.11.2 +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a56428085f3d1f60d243071976cf17ef81ae64cc02176aa9106e0f38763e8c2
|
4
|
+
data.tar.gz: d7176edca0e7fd26c7e6724a1c63c8817c7104666e1ed7108c25ef91e7449662
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 332e9a47297b9ee84f03527119b6e286301378ffce699c5fa3d0f23549f4e345754e439f2afc540190415bc02cb4bd466b15a17498560c564701115dc2698a51
|
7
|
+
data.tar.gz: 7979f2ea6cdbda52973fd13f1b403f99ae3852ce9a1e3112b144a45e63af21b43b9bc3f6591f5f5004a5fe8df3c3f77cc7d85fbc4aa2150a92563ac1dc3fc4a7
|
data/.travis.yml
CHANGED
@@ -2,38 +2,50 @@ language: ruby
|
|
2
2
|
os: linux
|
3
3
|
sudo: false
|
4
4
|
|
5
|
-
gemfile:
|
6
|
-
- gemfiles/Gemfile.td-agent-3.8.0
|
7
|
-
- gemfiles/Gemfile.td-agent-4.0.1
|
8
|
-
|
9
5
|
# Test with supported td-agent versions
|
10
|
-
# https://
|
11
|
-
# https://docs.
|
6
|
+
# https://docs.fluentd.org/quickstart/support#change-logs
|
7
|
+
# https://docs.treasuredata.com/display/public/PD/The+td-agent+Change+Log
|
8
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/master/CHANGELOG.md
|
12
9
|
matrix:
|
13
10
|
include:
|
14
|
-
-
|
15
|
-
|
16
|
-
-
|
17
|
-
|
18
|
-
-
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
-
|
23
|
-
|
24
|
-
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
-
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
-
|
33
|
-
|
34
|
-
-
|
35
|
-
|
36
|
-
|
11
|
+
- gemfile: gemfiles/Gemfile.fluentd-1.12.3 # Latest Fluentd / https://www.fluentd.org/download
|
12
|
+
rvm: 2.7.3 # Latest supported Ruby (less than v3.0.0) / https://www.ruby-lang.org/en/downloads
|
13
|
+
- gemfile: gemfiles/Gemfile.fluentd-0.14.22 # Oldest supported Fluentd
|
14
|
+
rvm: 2.3.0 # Oldest supported Ruby
|
15
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.1.0
|
16
|
+
rvm: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.0/config/projects/td-agent3.rb#L20
|
17
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.1.1
|
18
|
+
# rvm: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.1/config/projects/td-agent3.rb#L17
|
19
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.2.0
|
20
|
+
# rvm: 2.4.4 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.2.0/config/projects/td-agent3.rb#L22
|
21
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.2.1
|
22
|
+
rvm: 2.4.4 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.2.1/config/projects/td-agent3.rb#L22
|
23
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.3.0
|
24
|
+
rvm: 2.4.5 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.3.0/config/projects/td-agent3.rb#L22
|
25
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.4.0
|
26
|
+
# rvm: 2.4.5 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/config/projects/td-agent3.rb#L22
|
27
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.4.1
|
28
|
+
rvm: 2.4.6 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.1/config/projects/td-agent3.rb#L22
|
29
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.5.0
|
30
|
+
# rvm: 2.4.6 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.5.0/config/projects/td-agent3.rb#L22
|
31
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.5.1
|
32
|
+
rvm: 2.4.9 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.5.1/config/projects/td-agent3.rb#L22
|
33
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.6.0
|
34
|
+
rvm: 2.4.9 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.6.0/config/projects/td-agent3.rb#L22
|
35
|
+
# - gemfile: gemfiles/Gemfile.td-agent-3.7.0
|
36
|
+
# rvm: 2.4.9 # https://github.com/treasure-data/omnibus-td-agent/commit/da5cb39ec5396f652cd30bad5bb8ef4ec19071a9#diff-f73e763ace61e7c4bf48bf94bd6e295bc2cfd1ce5f9e38a4d19e266353e37498R22
|
37
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.7.1
|
38
|
+
rvm: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.7.1/config/projects/td-agent3.rb#L22
|
39
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.8.0 # Latest official release of td-agent v3
|
40
|
+
rvm: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.8.0/config/projects/td-agent3.rb#L22
|
41
|
+
- gemfile: gemfiles/Gemfile.td-agent-3.8.1 # Maintenance release of td-agent v3
|
42
|
+
rvm: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/pull/273/files#diff-f73e763ace61e7c4bf48bf94bd6e295bc2cfd1ce5f9e38a4d19e266353e37498R22
|
43
|
+
# - gemfile: gemfiles/Gemfile.td-agent-4.0.0
|
44
|
+
# rvm: 2.7.1 # https://github.com/fluent-plugins-nursery/td-agent-builder/blob/41b3436d43c21e48a9cf34c58ae640f0e3dfb44c/td-agent/config.rb#L16
|
45
|
+
- gemfile: gemfiles/Gemfile.td-agent-4.0.1
|
46
|
+
rvm: 2.7.1 # https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.0.1/td-agent/config.rb#L16
|
47
|
+
- gemfile: gemfiles/Gemfile.td-agent-4.1.0
|
48
|
+
rvm: 2.7.2 # https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.1.0/td-agent/config.rb#L19
|
37
49
|
fast_finish: true
|
38
50
|
|
39
51
|
script: bundle exec rake test
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.4.0
|
4
|
+
|
5
|
+
- Enhancement - Enable to monitor batch request failure and retries : [#150](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/150) [#211](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/211)
|
6
|
+
- Enhancement - Make sleep reliable by measuring actual slept time : [#162](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/162)
|
7
|
+
- Enhancement - Add td-agent 4.1.0 and Fluentd 1.12.3 to test cases
|
8
|
+
|
3
9
|
## 3.3.0
|
4
10
|
|
5
11
|
- Feature - Add web_identity_credentials configuration for IRSA : [#208](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/208) [#209](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/209)
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Fluent plugin for Amazon Kinesis
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.
|
3
|
+
[![Build Status](https://travis-ci.com/awslabs/aws-fluent-plugin-kinesis.svg?branch=master)](https://travis-ci.com/awslabs/aws-fluent-plugin-kinesis)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
|
5
5
|
[![Gem Downloads](https://img.shields.io/gem/dt/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
|
6
6
|
|
@@ -408,6 +408,16 @@ Default:
|
|
408
408
|
- `kinesis_firehose`: 4 MB
|
409
409
|
- `kinesis_streams_aggregated`: 1 MB
|
410
410
|
|
411
|
+
### drop_failed_records_after_batch_request_retries
|
412
|
+
Boolean, default `true`.
|
413
|
+
|
414
|
+
If *drop_failed_records_after_batch_request_retries* is enabled (default), the plugin will drop failed records when batch request fails after retrying max times configured as *retries_on_batch_request*. This dropping can be monitored from [monitor_agent](https://docs.fluentd.org/input/monitor_agent) or [fluent-plugin-prometheus](https://docs.fluentd.org/monitoring-fluentd/monitoring-prometheus) as *retry_count* or *num_errors* metrics.
|
415
|
+
|
416
|
+
If *drop_failed_records_after_batch_request_retries* is disabled, the plugin will raise error and return chunk to Fluentd buffer when batch request fails after retrying max times. Fluentd will retry to send chunk records according to retry config in [Buffer Section](https://docs.fluentd.org/configuration/buffer-section). Note that this retryng may create duplicate records since [PutRecords API](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html) of Kinesis Data Streams and [PutRecordBatch API](https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html) of Kinesis Data Firehose may return a partially successful response.
|
417
|
+
|
418
|
+
### monitor_num_of_batch_request_retries
|
419
|
+
Boolean, default `false`. If enabled, the plugin will increment *retry_count* monitoring metrics after internal retrying to send batch request. This configuration enables you to monitor [ProvisionedThroughputExceededException](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html) from [monitor_agent](https://docs.fluentd.org/input/monitor_agent) or [fluent-plugin-prometheus](https://docs.fluentd.org/monitoring-fluentd/monitoring-prometheus). Note that *retry_count* metrics will be counted by the plugin in addition to original Fluentd buffering mechanism if *monitor_num_of_batch_request_retries* is enabled.
|
420
|
+
|
411
421
|
## Configuration: kinesis_streams
|
412
422
|
Here are `kinesis_streams` specific configurations.
|
413
423
|
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for td-agent v3.4.0
|
7
|
+
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/config/projects/td-agent3.rb#L27
|
8
|
+
gem "fluentd", "1.4.2"
|
9
|
+
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/plugin_gems.rb#L16-L23
|
10
|
+
gem "jmespath", "1.4.0"
|
11
|
+
gem "aws-partitions", "1.149.0"
|
12
|
+
gem "aws-sigv4", "1.1.0"
|
13
|
+
gem "aws-sdk-core", "3.48.3"
|
14
|
+
gem "aws-sdk-kms", "1.16.0"
|
15
|
+
gem "aws-sdk-sqs", "1.13.0"
|
16
|
+
gem "aws-sdk-s3", "1.36.0"
|
17
|
+
gem "fluent-plugin-s3", "1.1.9"
|
@@ -1,29 +1,12 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
18
4
|
gemspec path: ".."
|
19
5
|
|
20
6
|
# Specify related gems for td-agent v3.4.1
|
21
|
-
# td-agent v3.4.0 has the same dependencies
|
22
7
|
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.1/config/projects/td-agent3.rb#L27
|
23
|
-
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/config/projects/td-agent3.rb#L27
|
24
8
|
gem "fluentd", "1.4.2"
|
25
9
|
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.1/plugin_gems.rb#L16-L23
|
26
|
-
# https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/plugin_gems.rb#L16-L23
|
27
10
|
gem "jmespath", "1.4.0"
|
28
11
|
gem "aws-partitions", "1.149.0"
|
29
12
|
gem "aws-sigv4", "1.1.0"
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for td-agent v3.7.0
|
7
|
+
# https://docs.treasuredata.com/display/public/PD/The+td-agent+Change+Log
|
8
|
+
gem "fluentd", "1.10.0"
|
9
|
+
# https://github.com/treasure-data/omnibus-td-agent/commit/74920cb2a55e40195961a58c6b6de4bd5b3f1f87#diff-8d45eaa8758f7591f884c9e9917ea96105331a1daf5a891b4645b89e120f2d69R16-R23
|
10
|
+
gem "jmespath", "1.4.0"
|
11
|
+
gem "aws-partitions", "1.288.0"
|
12
|
+
gem "aws-sigv4", "1.1.1"
|
13
|
+
gem "aws-sdk-core", "3.92.0"
|
14
|
+
gem "aws-sdk-kms", "1.30.0"
|
15
|
+
gem "aws-sdk-sqs", "1.24.0"
|
16
|
+
gem "aws-sdk-s3", "1.61.1"
|
17
|
+
gem "fluent-plugin-s3", "1.3.0"
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -1,17 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
@@ -0,0 +1,18 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Maintenance release of td-agent v3
|
7
|
+
# Specify related gems for td-agent v3.8.1
|
8
|
+
# https://github.com/treasure-data/omnibus-td-agent/pull/273/files#diff-f73e763ace61e7c4bf48bf94bd6e295bc2cfd1ce5f9e38a4d19e266353e37498R27
|
9
|
+
gem "fluentd", "1.11.5"
|
10
|
+
# https://github.com/treasure-data/omnibus-td-agent/pull/273/files#diff-8d45eaa8758f7591f884c9e9917ea96105331a1daf5a891b4645b89e120f2d69R19-R25
|
11
|
+
gem "jmespath", "1.4.0"
|
12
|
+
gem "aws-partitions", "1.399.0"
|
13
|
+
gem "aws-sigv4", "1.2.2"
|
14
|
+
gem "aws-sdk-core", "3.109.3"
|
15
|
+
gem "aws-sdk-kms", "1.39.0"
|
16
|
+
gem "aws-sdk-sqs", "1.34.0"
|
17
|
+
gem "aws-sdk-s3", "1.85.0"
|
18
|
+
gem "fluent-plugin-s3", "1.4.0"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for td-agent v4.0.0
|
7
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/master/CHANGELOG.md
|
8
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/41b3436d43c21e48a9cf34c58ae640f0e3dfb44c/td-agent/config.rb#L4
|
9
|
+
gem "fluentd", "1.11.1"
|
10
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/8a8721c2a0b05bc487fb81a04aa079c8bb4e47fb/gemfiles/linux/Gemfile#L31
|
11
|
+
gem "prometheus-client", "0.9.0"
|
12
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/8a8721c2a0b05bc487fb81a04aa079c8bb4e47fb/gemfiles/linux/Gemfile#L19-L20
|
13
|
+
gem "fluent-plugin-prometheus", "1.8.0"
|
14
|
+
gem "fluent-plugin-prometheus_pushgateway", "0.0.2"
|
15
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/8a8721c2a0b05bc487fb81a04aa079c8bb4e47fb/gemfiles/linux/Gemfile#L28
|
16
|
+
gem "jmespath", "1.4.0"
|
17
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/8a8721c2a0b05bc487fb81a04aa079c8bb4e47fb/gemfiles/linux/Gemfile#L8-L13
|
18
|
+
gem "aws-partitions", "1.337.0"
|
19
|
+
gem "aws-sdk-core", "3.102.1"
|
20
|
+
gem "aws-sdk-kms", "1.35.0"
|
21
|
+
gem "aws-sdk-s3", "1.72.0"
|
22
|
+
gem "aws-sdk-sqs", "1.29.0"
|
23
|
+
gem "aws-sigv4", "1.2.1"
|
24
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/8a8721c2a0b05bc487fb81a04aa079c8bb4e47fb/gemfiles/linux/Gemfile#L23
|
25
|
+
gem "fluent-plugin-s3", "1.3.3"
|
@@ -1,26 +1,16 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
1
|
source 'https://rubygems.org'
|
16
2
|
|
17
3
|
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
18
4
|
gemspec path: ".."
|
19
5
|
|
20
6
|
# Specify related gems for td-agent v4.0.1
|
7
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/master/CHANGELOG.md
|
21
8
|
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.0.1/td-agent/config.rb#L4
|
22
|
-
gem "fluentd", "1.11.
|
9
|
+
gem "fluentd", "1.11.2"
|
23
10
|
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.0.1/gemfiles/linux/Gemfile#L35-L42
|
11
|
+
gem "prometheus-client", "0.9.0"
|
12
|
+
gem "fluent-plugin-prometheus", "1.8.2"
|
13
|
+
gem "fluent-plugin-prometheus_pushgateway", "0.0.2"
|
24
14
|
gem "jmespath", "1.4.0"
|
25
15
|
gem "aws-partitions", "1.352.0"
|
26
16
|
gem "aws-sdk-core", "3.104.3"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
4
|
+
gemspec path: ".."
|
5
|
+
|
6
|
+
# Specify related gems for td-agent v4.1.0
|
7
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/master/CHANGELOG.md
|
8
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.1.0/td-agent/config.rb#L4
|
9
|
+
gem "fluentd", "1.12.1"
|
10
|
+
# https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.1.0/td-agent/Gemfile#L32-L42
|
11
|
+
gem "prometheus-client", "0.9.0"
|
12
|
+
gem "fluent-plugin-prometheus", "1.8.5"
|
13
|
+
gem "fluent-plugin-prometheus_pushgateway", "0.0.2"
|
14
|
+
gem "jmespath", "1.4.0"
|
15
|
+
gem "aws-partitions", "1.427.0"
|
16
|
+
gem "aws-sdk-core", "3.112.0"
|
17
|
+
gem "aws-sdk-kms", "1.42.0"
|
18
|
+
gem "aws-sdk-sqs", "1.36.0"
|
19
|
+
gem "aws-sigv4", "1.2.2"
|
20
|
+
gem "aws-sdk-s3", "1.88.1"
|
21
|
+
gem "fluent-plugin-s3", "1.5.1"
|
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
require 'fluent_plugin_kinesis/version'
|
16
16
|
require 'fluent/configurable'
|
17
|
+
require 'benchmark'
|
17
18
|
|
18
19
|
module Fluent
|
19
20
|
module Plugin
|
@@ -40,10 +41,12 @@ module Fluent
|
|
40
41
|
module BatchRequest
|
41
42
|
module BatchRequestParams
|
42
43
|
include Fluent::Configurable
|
43
|
-
config_param :retries_on_batch_request,
|
44
|
-
config_param :reset_backoff_if_success,
|
45
|
-
config_param :batch_request_max_count,
|
46
|
-
config_param :batch_request_max_size,
|
44
|
+
config_param :retries_on_batch_request, :integer, default: 8
|
45
|
+
config_param :reset_backoff_if_success, :bool, default: true
|
46
|
+
config_param :batch_request_max_count, :integer, default: nil
|
47
|
+
config_param :batch_request_max_size, :integer, default: nil
|
48
|
+
config_param :drop_failed_records_after_batch_request_retries, :bool, default: true
|
49
|
+
config_param :monitor_num_of_batch_request_retries, :bool, default: false
|
47
50
|
end
|
48
51
|
|
49
52
|
def self.included(mod)
|
@@ -96,11 +99,9 @@ module Fluent
|
|
96
99
|
wait_second = backoff.next
|
97
100
|
msg = 'Retrying to request batch. Retry count: %3d, Retry records: %3d, Wait seconds %3.2f' % [retry_count+1, failed_records.size, wait_second]
|
98
101
|
log.warn(truncate msg)
|
99
|
-
#
|
100
|
-
|
101
|
-
|
102
|
-
sleep(wait_second)
|
103
|
-
log.debug("#{Thread.current.object_id} sleep finish")
|
102
|
+
# Increment num_errors to monitor batch request retries from "monitor_agent" or "fluent-plugin-prometheus"
|
103
|
+
increment_num_errors if @monitor_num_of_batch_request_retries
|
104
|
+
reliable_sleep(wait_second)
|
104
105
|
batch_request_with_retry(retry_records(failed_records), retry_count+1, backoff: backoff, &block)
|
105
106
|
else
|
106
107
|
give_up_retries(failed_records)
|
@@ -108,6 +109,18 @@ module Fluent
|
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
112
|
+
# Sleep seems to not sleep as long as we ask it, our guess is that something wakes up the thread,
|
113
|
+
# so we keep on going to sleep if that happens.
|
114
|
+
# TODO: find out who is causing the sleep to be too short and try to make them stop it instead
|
115
|
+
def reliable_sleep(wait_second)
|
116
|
+
loop do
|
117
|
+
actual = Benchmark.realtime { sleep(wait_second) }
|
118
|
+
break if actual >= wait_second
|
119
|
+
log.error("#{Thread.current.object_id} sleep failed expected #{wait_second} but slept #{actual}")
|
120
|
+
wait_second -= actual
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
111
124
|
def any_records_shipped?(res)
|
112
125
|
results(res).size > failed_count(res)
|
113
126
|
end
|
@@ -164,6 +177,49 @@ module Fluent
|
|
164
177
|
record[:original]
|
165
178
|
])
|
166
179
|
}
|
180
|
+
|
181
|
+
if @drop_failed_records_after_batch_request_retries
|
182
|
+
# Increment num_errors to monitor batch request failure from "monitor_agent" or "fluent-plugin-prometheus"
|
183
|
+
increment_num_errors
|
184
|
+
else
|
185
|
+
# Raise error and return chunk to Fluentd for retrying
|
186
|
+
case request_type
|
187
|
+
# @see https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html
|
188
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Kinesis/Client.html#put_records-instance_method
|
189
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Kinesis/Errors.html
|
190
|
+
when :streams, :streams_aggregated
|
191
|
+
provisioned_throughput_exceeded_records = failed_records.select { |record| record[:error_code] == 'ProvisionedThroughputExceededException' }
|
192
|
+
target_failed_record = provisioned_throughput_exceeded_records.first || failed_records.first
|
193
|
+
target_error = provisioned_throughput_exceeded_records.empty? ?
|
194
|
+
Aws::Kinesis::Errors::ServiceError :
|
195
|
+
Aws::Kinesis::Errors::ProvisionedThroughputExceededException
|
196
|
+
# @see https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html
|
197
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Firehose/Client.html#put_record_batch-instance_method
|
198
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Firehose/Errors.html
|
199
|
+
when :firehose
|
200
|
+
service_unavailable_exception_records = failed_records.select { |record| record[:error_code] == 'ServiceUnavailableException' }
|
201
|
+
target_failed_record = service_unavailable_exception_records.first || failed_records.first
|
202
|
+
target_error = service_unavailable_exception_records.empty? ?
|
203
|
+
Aws::Firehose::Errors::ServiceError :
|
204
|
+
Aws::Firehose::Errors::ServiceUnavailableException
|
205
|
+
end
|
206
|
+
log.error("Raise #{target_failed_record[:error_code]} and return chunk to Fluentd buffer for retrying")
|
207
|
+
raise target_error.new(Seahorse::Client::RequestContext.new, target_failed_record[:error_message])
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
def increment_num_errors
|
212
|
+
# Prepare Fluent::Plugin::Output instance variables to count errors in this method.
|
213
|
+
# These instance variables are initialized here for possible future breaking changes of Fluentd.
|
214
|
+
@num_errors ||= 0
|
215
|
+
# @see https://github.com/fluent/fluentd/commit/d245454658d16170431d276fcd5849fb0d88ab2b
|
216
|
+
if Gem::Version.new(Fluent::VERSION) >= Gem::Version.new('1.7.0')
|
217
|
+
@counter_mutex ||= Mutex.new
|
218
|
+
@counter_mutex.synchronize{ @num_errors += 1 }
|
219
|
+
else
|
220
|
+
@counters_monitor ||= Monitor.new
|
221
|
+
@counters_monitor.synchronize{ @num_errors += 1 }
|
222
|
+
end
|
167
223
|
end
|
168
224
|
|
169
225
|
class Backoff
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-kinesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -284,19 +284,24 @@ files:
|
|
284
284
|
- benchmark/task.rake
|
285
285
|
- fluent-plugin-kinesis.gemspec
|
286
286
|
- gemfiles/Gemfile.fluentd-0.14.22
|
287
|
-
- gemfiles/Gemfile.fluentd-1.
|
287
|
+
- gemfiles/Gemfile.fluentd-1.12.3
|
288
288
|
- gemfiles/Gemfile.td-agent-3.1.0
|
289
289
|
- gemfiles/Gemfile.td-agent-3.1.1
|
290
290
|
- gemfiles/Gemfile.td-agent-3.2.0
|
291
291
|
- gemfiles/Gemfile.td-agent-3.2.1
|
292
292
|
- gemfiles/Gemfile.td-agent-3.3.0
|
293
|
+
- gemfiles/Gemfile.td-agent-3.4.0
|
293
294
|
- gemfiles/Gemfile.td-agent-3.4.1
|
294
295
|
- gemfiles/Gemfile.td-agent-3.5.0
|
295
296
|
- gemfiles/Gemfile.td-agent-3.5.1
|
296
297
|
- gemfiles/Gemfile.td-agent-3.6.0
|
298
|
+
- gemfiles/Gemfile.td-agent-3.7.0
|
297
299
|
- gemfiles/Gemfile.td-agent-3.7.1
|
298
300
|
- gemfiles/Gemfile.td-agent-3.8.0
|
301
|
+
- gemfiles/Gemfile.td-agent-3.8.1
|
302
|
+
- gemfiles/Gemfile.td-agent-4.0.0
|
299
303
|
- gemfiles/Gemfile.td-agent-4.0.1
|
304
|
+
- gemfiles/Gemfile.td-agent-4.1.0
|
300
305
|
- lib/fluent/plugin/kinesis.rb
|
301
306
|
- lib/fluent/plugin/kinesis_helper/aggregator.rb
|
302
307
|
- lib/fluent/plugin/kinesis_helper/api.rb
|
@@ -324,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
329
|
- !ruby/object:Gem::Version
|
325
330
|
version: '0'
|
326
331
|
requirements: []
|
327
|
-
rubygems_version: 3.
|
332
|
+
rubygems_version: 3.1.4
|
328
333
|
signing_key:
|
329
334
|
specification_version: 4
|
330
335
|
summary: Fluentd output plugin that sends events to Amazon Kinesis.
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
|
-
# may not use this file except in compliance with the License. A copy of
|
6
|
-
# the License is located at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# or in the "license" file accompanying this file. This file is
|
11
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
12
|
-
# ANY KIND, either express or implied. See the License for the specific
|
13
|
-
# language governing permissions and limitations under the License.
|
14
|
-
|
15
|
-
source 'https://rubygems.org'
|
16
|
-
|
17
|
-
# Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
|
18
|
-
gemspec path: ".."
|
19
|
-
|
20
|
-
gem "fluentd", "1.11.2"
|