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 +4 -4
- data/Gemfile.lock +1 -1
- data/fluent-plugin-datadog-log.gemspec +1 -1
- data/fluent-plugin-datadog-log.gemspec~ +1 -1
- data/lib/fluent/plugin/out_datadog_log.rb +4 -2
- data/pkg/fluent-plugin-datadog-log-0.1.0.rc2.gem +0 -0
- data/test/plugin/test_out_datadog_log.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 611b755ad3430317ab1fbb5993bab8fce0a1a627
|
4
|
+
data.tar.gz: 1a3831af8f454ddf9c21adcffcdf1b9a1bc5c1e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84f631f652a38971f1d2e1b038535ad989df1161cbc2b758c85dac07385cdf441cef6ecea8090d0947ccf95ba724cf153558546793ac2fd33c13156691648ddd
|
7
|
+
data.tar.gz: 799fe91700013328051d6ffef9e601330cdb93df09f5faf095d0a856b0d3431b68304db873c0bf7d63feb633f6175e0bb20f9a1d9e100ef6121807ab33ad1a12
|
data/Gemfile.lock
CHANGED
@@ -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.
|
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.
|
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
|
-
|
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)
|
Binary file
|
@@ -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.
|
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-
|
11
|
+
date: 2017-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|