fluent-plugin-logzio 0.0.16 → 0.0.17

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
  SHA1:
3
- metadata.gz: 75acfaf69be145654b96a47df4ebccc3a41ab018
4
- data.tar.gz: 9070b8733148fa6366235a50909f55494eae9c27
3
+ metadata.gz: f536821f3b16af3e536157a7c0689f92a9123d0b
4
+ data.tar.gz: 07103312f4d8d969ec9332e1117c684fd311ed8a
5
5
  SHA512:
6
- metadata.gz: 0471525a8263e3e242607e912114727305fe3a2ccdb89c5d854cba6c732e5339c587e3931c0663c6357d18aabe26c224a214d4b8c75d88a4a4c7d06ef02bf124
7
- data.tar.gz: 201dcb57eea7ef2687ab84e0f51070855ee26cd344cf59f31d18578843bbde3ad3613ceeecd9319564af9036fe8298ac5d849b14da5d291ff688bcf25050a740
6
+ metadata.gz: 207bce099d2b610d49833ce704c119a0d2eb981b41d8ecb863af7ad4dfd5868a8958e15f393c1e7c8a9ab7ac2203e11f017a7776b636b88b090138a464ca5f1c
7
+ data.tar.gz: 5f5c803734b96374ccd03a32b72ae3bf257471124e12bdf0cac7065cfcaaa45e09ee442af099193e6ae813771b6a068d649f3a9a5145759877f61e14707d9e24
data/README.md CHANGED
@@ -68,8 +68,10 @@ This is an **example** only. Your needs in production may vary!
68
68
  * **retry_count** How many times to resend failed bulks. Defaults to 4 times.
69
69
  * **retry_sleep** How long to sleep initially between retries, exponential step-off. Initial default is 2s.
70
70
  * **bulk_limit** Limit to the size of the Logz.io upload bulk. Defaults to 1000000 bytes leaving about 24kB for overhead.
71
+ * **bulk_limit_warning_limit** Limit to the size of the Logz.io warning message when a record exceeds bulk_limit to prevent a recursion when Fluent warnings are sent to the Logz.io output. Defaults to nil (no truncation).
71
72
 
72
73
  ## Release Notes
74
+ - 0.0.17: Optional truncate log messages when they are exceeding bulk size in warning logs
73
75
  - 0.0.16: More fluentD 1.0+ adjustments
74
76
  - 0.0.15: Support FluentD 1.0+. Split the chunk into bulk uploads, decoupling `chunk_limit_size`/`buffer_chunk_limit` from Logz.io bulk limit. Tunable `bulk_limit` and initial `retry_sleep`.
75
77
  - 0.0.14: Refactor send function to handle more cases, and retry in case of logzio connection failure.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'fluent-plugin-logzio'
7
- s.version = '0.0.16'
7
+ s.version = '0.0.17'
8
8
  s.authors = ['Yury Kotov', 'Roi Rav-Hon', 'Arcadiy Ivanov']
9
9
  s.email = ['bairkan@gmail.com', 'roi@logz.io', 'arcadiy@ivanov.biz']
10
10
  s.homepage = 'https://github.com/logzio/fluent-plugin-logzio'
@@ -13,6 +13,7 @@ module Fluent
13
13
  config_param :retry_count, :integer, default: 4 # How many times to resend failed bulks. Undocumented because not suppose to be changed
14
14
  config_param :retry_sleep, :integer, default: 2 # How long to sleep initially between retries, exponential step-off
15
15
  config_param :bulk_limit, :integer, default: 1000000 # Make sure submission to LogzIO does not exceed 1MB limit and leave some overhead
16
+ config_param :bulk_limit_warning_limit, :integer, default: nil # If fluent warnings are sent to the Logzio output, truncating is necessary to prevent a recursion
16
17
  config_param :http_idle_timeout, :integer, default: 5
17
18
  config_param :output_tags_fieldname, :string, default: 'fluentd_tags'
18
19
 
@@ -74,7 +75,13 @@ module Fluent
74
75
  end
75
76
 
76
77
  if record_size > @bulk_limit
77
- log.warn "Record with size #{record_size} exceeds #{@bulk_limit} and can't be sent to Logz.io. Record is: #{json_record}"
78
+ if @bulk_limit_warning_limit.is_a?(Integer)
79
+ log.warn "Record with size #{record_size} exceeds #{@bulk_limit} and can't be sent to Logz.io. Record starts with (truncated at #{@bulk_limit_warning_limit} characters): #{json_record[0,@bulk_limit_warning_limit]}"
80
+ # Send the full message to debug facility
81
+ log.debug "Record with size #{record_size} exceeds #{@bulk_limit} and can't be sent to Logz.io. Record is: #{json_record}"
82
+ else
83
+ log.warn "Record with size #{record_size} exceeds #{@bulk_limit} and can't be sent to Logz.io. Record is: #{json_record}"
84
+ end
78
85
  next
79
86
  end
80
87
  if bulk_size + record_size > @bulk_limit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-logzio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Kotov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-06 00:00:00.000000000 Z
13
+ date: 2018-06-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: net-http-persistent