fluent-plugin-logzio 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a82cd7629b087d3e44e7ca9d0a04df913e6439db
4
- data.tar.gz: 3e6fbfbae0f48eb296ac18de3c74881b52c1c56b
3
+ metadata.gz: 62ec2ef7d97bae772a4a192b40e5a96a7d5881c2
4
+ data.tar.gz: 33d16ac0fde96f99587cf2c0f54ad8ecc899cac3
5
5
  SHA512:
6
- metadata.gz: ff655a47646a4dbe73034981e5919bf9705c7853b38e64a816374448fef3f5589bb1cd8e90faf38bee4a6fbb57f112313708dd86a7d45cacd4ff4e38a1e35896
7
- data.tar.gz: d967ec4a019d7f4bc792b722cb9109b8a94dd5ed381d330e255387b4ee6e9de7c17266a1fa8c7ab35397ad243ae889fcfb5dcdefa318662451c434f5eb2fc0c1
6
+ metadata.gz: aef075bc7af4368c42bd5da57330826b97de83366b3953c64c6b7b036781962446320c1e72cd7e2df6c744c68e1266fa0b4deabf6c3ada449b91c61e97231d67
7
+ data.tar.gz: a2c3fe9527fa45564b0904e9f88b8ea966542bec944bfc95bdf5a72f9f790240d67c3c5e88c33b668d10e60292b81b53510aa55b522868e68d8b58c175a45f78
data/README.md CHANGED
@@ -12,7 +12,7 @@ With fluent-plugin-logzio you will be able to use [Logz.io](http://logz.io) as o
12
12
 
13
13
  ```
14
14
  <match your_match>
15
- type logzio_buffered
15
+ @type logzio_buffered
16
16
  endpoint_url https://listener.logz.io:8071?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&type=my_type
17
17
  output_include_time true
18
18
  output_include_tags true
@@ -27,7 +27,7 @@ With fluent-plugin-logzio you will be able to use [Logz.io](http://logz.io) as o
27
27
  If you absolutly must, use the non-buffered plugin (we really recommend using the buffered)
28
28
  ```
29
29
  <match your_match>
30
- type logzio
30
+ @type logzio
31
31
  endpoint_url http://listener.logz.io:8090?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
32
32
  </match>
33
33
  ```
@@ -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.10'
7
+ s.version = '0.0.11'
8
8
  s.authors = ['Yury Kotov', 'Roi Rav-Hon']
9
9
  s.email = ['bairkan@gmail.com', 'roi@logz.io']
10
10
  s.homepage = 'https://github.com/logzio/fluent-plugin-logzio'
@@ -40,9 +40,13 @@ module Fluent
40
40
  records = []
41
41
 
42
42
  chunk.msgpack_each {|tag,time,record|
43
- record['@timestamp'] ||= Time.at(time).iso8601(3) if @output_include_time
44
- record[@output_tags_fieldname] ||= tag.to_s if @output_include_tags
45
- records.push(Yajl.dump(record))
43
+ begin
44
+ record['@timestamp'] ||= Time.at(time).iso8601(3) if @output_include_time
45
+ record[@output_tags_fieldname] ||= tag.to_s if @output_include_tags
46
+ records.push(Yajl.dump(record))
47
+ rescue
48
+ log.error("Adding record #{record} to buffer failed. Exception: #{$!}")
49
+ end
46
50
  }
47
51
 
48
52
  log.debug "Got flush timeout, containing #{records.length} chunks"
@@ -14,7 +14,7 @@ describe 'Fluent::LogzioOutputBuffered' do
14
14
 
15
15
  describe 'emit' do
16
16
  before(:each) do
17
- expect(request).to receive(:body=).with('{"field1":50,"otherfield":99}\n{"field1":150,"otherfield":199}')
17
+ expect(request).to receive(:body=).with('{"field1":50,"otherfield":99,"fluentd_tags":"test"}' + "\n" + '{"field1":150,"otherfield":199,"fluentd_tags":"test"}')
18
18
  expect(Net::HTTP::Post).to receive(:new).with('/?token=123').once.and_return(request)
19
19
  expect_any_instance_of(Net::HTTP::Persistent).to receive(:request).once.and_return(response)
20
20
  end
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.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Kotov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-27 00:00:00.000000000 Z
12
+ date: 2017-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-http-persistent