fluent-plugin-datadog-log 0.1.0.rc8 → 0.1.0.rc9

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: 203d7e61e3dd701ae1eedb1ea19ced1c54e2a5ff
4
- data.tar.gz: 480f32b788064d57380d22ca7303b89f0e21fda9
3
+ metadata.gz: eb7c1ae1745bd1e2cf136e146145e280abec60c7
4
+ data.tar.gz: deb2d3d35eb0a37b431160f694ba2bb00511f2fd
5
5
  SHA512:
6
- metadata.gz: bc95b1cec3f57248ed8b76858ad4e215156903dee50c06fe2d34ccadedeae4169d0ec528ed0232c347c12cc6e525b0bc3ab7fa9b9fc561ef9581cdce90fdacfd
7
- data.tar.gz: f40f3c6a38257e7ac2a96e29f101a3744e901417ec25da001985988ca536553fcfbb7b10c6d5bb6e279e45db6489b6ab89c0ba3e8ce3f6f8e563b049c8fc9166
6
+ metadata.gz: 8cf0853cfa35f60f0abe8b069ad7f1eb77a0d4bade42e619da0190f0ac0a5fe6182ba55298aaef0bb82c8fd66efd74183c3c2dd67e599028d88752f62591d683
7
+ data.tar.gz: 60f773328557aa2a6cffc70439e14a58879b6dbfdba9648d1ed9825385d906e9e795e6cb083cb450d64115b4bc5bacc23a8612bdc52edfebd0c1c3f86f1f88df
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-datadog-log (0.1.0.rc8)
4
+ fluent-plugin-datadog-log (0.1.0.rc9)
5
5
  fluentd (~> 0.14)
6
6
  json (~> 1.8)
7
7
  net_tcp_client (~> 2.0.1)
8
8
  prometheus-client (~> 0.7.1)
9
+ semantic_logger (~> 4.2.0)
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
@@ -15,10 +16,11 @@ GEM
15
16
  ast (2.3.0)
16
17
  astrolabe (1.3.1)
17
18
  parser (~> 2.2)
18
- cool.io (1.5.1)
19
+ concurrent-ruby (1.0.5)
20
+ cool.io (1.5.3)
19
21
  crack (0.4.3)
20
22
  safe_yaml (~> 1.0.0)
21
- fluentd (0.14.22)
23
+ fluentd (0.14.24)
22
24
  cool.io (>= 1.4.5, < 2.0.0)
23
25
  http_parser.rb (>= 0.5.1, < 0.7.0)
24
26
  msgpack (>= 0.7.0, < 2.0.0)
@@ -58,6 +60,8 @@ GEM
58
60
  ruby-progressbar (1.9.0)
59
61
  ruby_dig (0.0.2)
60
62
  safe_yaml (1.0.4)
63
+ semantic_logger (4.2.0)
64
+ concurrent-ruby (~> 1.0)
61
65
  serverengine (2.0.5)
62
66
  sigdump (~> 0.2.2)
63
67
  sigdump (0.2.4)
@@ -8,7 +8,7 @@ eos
8
8
  gem.homepage = \
9
9
  'https://github.com/mumoshu/fluent-plugin-datadog-log'
10
10
  gem.license = 'Apache-2.0'
11
- gem.version = '0.1.0.rc8'
11
+ gem.version = '0.1.0.rc9'
12
12
  gem.authors = ['Yusuke KUOKA']
13
13
  gem.email = ['ykuoka@gmail.com']
14
14
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -23,6 +23,7 @@ eos
23
23
 
24
24
  gem.add_dependency 'net_tcp_client', '~> 2.0.1'
25
25
  gem.add_dependency 'prometheus-client', '~> 0.7.1'
26
+ gem.add_dependency 'semantic_logger', '~> 4.2.0'
26
27
 
27
28
  gem.add_development_dependency 'mocha', '~> 1.1'
28
29
  gem.add_development_dependency 'rake', '~> 10.3'
@@ -8,7 +8,7 @@ eos
8
8
  gem.homepage = \
9
9
  'https://github.com/mumoshu/fluent-plugin-datadog-log'
10
10
  gem.license = 'Apache-2.0'
11
- gem.version = '0.1.0.rc6'
11
+ gem.version = '0.1.0.rc8'
12
12
  gem.authors = ['Yusuke KUOKA']
13
13
  gem.email = ['ykuoka@gmail.com']
14
14
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
data/lib/datadog/log.rb CHANGED
@@ -1,4 +1,10 @@
1
1
  require 'openssl'
2
+
3
+ require 'semantic_logger'
4
+
5
+ SemanticLogger.default_level = :warn
6
+ SemanticLogger.add_appender(io: STDOUT, formatter: :json)
7
+
2
8
  require 'net/tcp_client'
3
9
  require 'socket'
4
10
  require 'time'
data/lib/datadog/log.rb~ CHANGED
@@ -96,7 +96,9 @@ module Datadog
96
96
  )
97
97
  )
98
98
  )
99
- @conn.write(payload)
99
+ @conn.retry_on_connection_failure do
100
+ @conn.write(payload)
101
+ end
100
102
  payload
101
103
  end
102
104
 
@@ -259,6 +259,8 @@ module Fluent::Plugin
259
259
  end
260
260
  end
261
261
 
262
+ @log.debug 'Dumping kubernetes metadata', metadata: kube
263
+
262
264
  if kube.key? 'annotations'
263
265
  annotations = kube['annotations']
264
266
  created_by_str = annotations['kubernetes.io/created-by']
@@ -321,7 +321,7 @@ module Fluent::Plugin
321
321
  if entries_count.nil?
322
322
  increment_dropped_entries_count(1)
323
323
  @log.error 'Not retrying a log message later',
324
- error: error.to_s
324
+ error: error.to_s, error_class: error.class
325
325
  else
326
326
  increment_retried_entries_count(entries_count)
327
327
  # RPC cancelled, so retry via re-raising the error.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-datadog-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc8
4
+ version: 0.1.0.rc9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke KUOKA
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.7.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: semantic_logger
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 4.2.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 4.2.0
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: mocha
71
85
  requirement: !ruby/object:Gem::Requirement