fluent-plugin-datadog-log 0.1.0.rc2 → 0.1.0.rc3

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: 2ec628db3ffd3258f75a1ec766c763f3d4ad70ea
4
- data.tar.gz: 9dc3f96c5ff194ab5cdb17e3e7ed1ac7ccfcecfd
3
+ metadata.gz: 611b755ad3430317ab1fbb5993bab8fce0a1a627
4
+ data.tar.gz: 1a3831af8f454ddf9c21adcffcdf1b9a1bc5c1e5
5
5
  SHA512:
6
- metadata.gz: 5a97cd2159cb172acd76cb1ed9141176cac53758dd2d384b6bcd7c77dacf0f45f37e81edc932b092e2c86847b65c3a552f8a2756057ae456364aacfafc3b1f6a
7
- data.tar.gz: e26b6ef4808d0d76fc56f0d63b545f7df3497658ed9353fa7aa1cdb00d20f834227a825bb7e3c45f5dfe127a18bad7add8d55b258cca983c103f70a9fd092329
6
+ metadata.gz: 84f631f652a38971f1d2e1b038535ad989df1161cbc2b758c85dac07385cdf441cef6ecea8090d0947ccf95ba724cf153558546793ac2fd33c13156691648ddd
7
+ data.tar.gz: 799fe91700013328051d6ffef9e601330cdb93df09f5faf095d0a856b0d3431b68304db873c0bf7d63feb633f6175e0bb20f9a1d9e100ef6121807ab33ad1a12
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-datadog-log (0.1.0.rc2)
4
+ fluent-plugin-datadog-log (0.1.0.rc3)
5
5
  fluentd (~> 0.14)
6
6
  json (~> 1.8)
7
7
 
@@ -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.rc2'
11
+ gem.version = '0.1.0.rc3'
12
12
  gem.authors = ['Yusuke KUOKA']
13
13
  gem.email = ['ykuoka@gmail.com']
14
14
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -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.rc1'
11
+ gem.version = '0.1.0.rc2'
12
12
  gem.authors = ['Yusuke KUOKA']
13
13
  gem.email = ['ykuoka@gmail.com']
14
14
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -280,7 +280,10 @@ module Fluent::Plugin
280
280
 
281
281
  tags.concat(@default_tags)
282
282
 
283
- service = kube_labels['app'] || kube_labels['k8s-app'] unless kube_labels.nil?
283
+ unless kube_labels.nil?
284
+ service = kube_labels['app'] ||
285
+ kube_labels['k8s-app']
286
+ end
284
287
  source = kube['pod_name']
285
288
  source_category = kube['container_name']
286
289
 
@@ -314,7 +317,6 @@ module Fluent::Plugin
314
317
  end
315
318
 
316
319
  rescue => error
317
- raise error
318
320
  increment_failed_requests_count
319
321
  if entries_count.nil?
320
322
  increment_dropped_entries_count(1)
@@ -113,6 +113,7 @@ class DatadogLogOutputTest < Test::Unit::TestCase
113
113
  source_category mysourcecategory
114
114
  logset mylogset
115
115
  log_level debug
116
+ tags ["kube_cluster=MyCluster", "mykey=myval"]
116
117
  EOC
117
118
  conn = StubConn.new
118
119
  fluentd_tag = 'mytag'
@@ -146,7 +147,7 @@ class DatadogLogOutputTest < Test::Unit::TestCase
146
147
  assert_equal(1, d.logs.count { |l| l =~ /Sent payload to Datadog/ })
147
148
  assert_equal(1, conn.sent.size)
148
149
  # rubocop:disable LineLength
149
- payload = %(myapikey/mylogset <46>0 2006-01-02T15:04:05.000000+00:00 i-81c16767 myapp - - [dd ddsource="mypod"][dd ddsourcecategory="mycontainer"][dd ddtags="pod_name=mypod,container_name=mycontainer,kube_k8s-app=myapp,kube_deployment=myapp,host=i-81c16767,zone=aws:us-west-2b,aws_account_id=123456789012"] mymsg\n)
150
+ payload = %(myapikey/mylogset <46>0 2006-01-02T15:04:05.000000+00:00 i-81c16767 myapp - - [dd ddsource="mypod"][dd ddsourcecategory="mycontainer"][dd ddtags="pod_name=mypod,container_name=mycontainer,kube_k8s-app=myapp,kube_deployment=myapp,host=i-81c16767,zone=aws:us-west-2b,aws_account_id=123456789012,kube_cluster=MyCluster,mykey=myval"] mymsg\n)
150
151
  # rubocop:enable LineLength
151
152
  assert_equal(payload, conn.sent.first)
152
153
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.rc2
4
+ version: 0.1.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke KUOKA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-13 00:00:00.000000000 Z
11
+ date: 2017-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd