fluent-plugin-cloudwatch-logs 0.3.4 → 0.3.5

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: 2a0b8784f05777d68456df37bb4eb4960875b8f3
4
- data.tar.gz: 47cd09415a13c9ffb3115c6699b757ab52aa058b
3
+ metadata.gz: 8aba8ef4dd50f6f0c4a37a2edb7fb667918aee9b
4
+ data.tar.gz: 1575a679177cc6d17d9ee5cb9e2250529b40d77d
5
5
  SHA512:
6
- metadata.gz: 6d2aec22eafd89f3296143585f6df655523e63a2deb1674fac8db215230ff16597431737bc9a62d1fc1e12e1c95430aac975cbca1be343f7767620d760117b48
7
- data.tar.gz: a599feb1373e6ef33f8b30e5788be7ed6ea0f18678c805b63f6bd9167c435f88f4325f7b65306edef61a4e844d0e9a5df27bd258da274f6e2b226ee02725cc75
6
+ metadata.gz: bce5a3de1a1420545cfaf8e962c2f0f5d9b183e7415bf841f999d8dbddcc96253fb536a636574dbf73c0407c9324dd83fe8799d5c9d0b86b481e2d327cf4ed49
7
+ data.tar.gz: 2942f9779b4761c3bf5d436877891fc054b0b37f9a167ce97beefa6a55f2307625726f93d809b35fb9dea601641da9486fafa0e8944c91e0fd46856de75765aa
@@ -2,7 +2,7 @@ module Fluent
2
2
  module Plugin
3
3
  module Cloudwatch
4
4
  module Logs
5
- VERSION = "0.3.4"
5
+ VERSION = "0.3.5"
6
6
  end
7
7
  end
8
8
  end
@@ -73,7 +73,14 @@ module Fluent
73
73
  end
74
74
 
75
75
  def write(chunk)
76
- chunk.enum_for(:msgpack_each).group_by {|tag, time, record|
76
+ chunk.enum_for(:msgpack_each).select {|tag, time, record|
77
+ if record.nil?
78
+ log.warn "record is nil (tag=#{tag})"
79
+ false
80
+ else
81
+ true
82
+ end
83
+ }.group_by {|tag, time, record|
77
84
  group = case
78
85
  when @use_tag_as_group
79
86
  tag
@@ -104,6 +111,11 @@ module Fluent
104
111
  }.each {|group_stream, rs|
105
112
  group_name, stream_name = group_stream
106
113
 
114
+ if stream_name.nil?
115
+ log.warn "stream_name is nil (group_name=#{group_name})"
116
+ next
117
+ end
118
+
107
119
  unless log_group_exists?(group_name)
108
120
  if @auto_create_stream
109
121
  create_log_group(group_name)
@@ -309,6 +321,7 @@ module Fluent
309
321
  break
310
322
  end
311
323
  next_token = response.next_token
324
+ sleep 0.1
312
325
  end
313
326
  nil
314
327
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cloudwatch-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-14 00:00:00.000000000 Z
11
+ date: 2017-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd