fluent-plugin-datadog-np 0.10.6.2 → 0.10.6.3
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 +4 -4
- data/fluent-plugin-datadog-np.gemspec +1 -1
- data/lib/fluent/plugin/out_datadog.rb +14 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff5553e47eda6aa14ce16d939eef66e20ef4c1aa
|
4
|
+
data.tar.gz: 3b29129b80804c4fb0ac304659e4d8f265b0a347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7e3c6b5347a394cafee96c6e1b42a15fc0ef1dd94d55f655edd5ddddf7a78b63f70f11f3c3781f7ed3ec14e9845387eb7564e9472d3c3b6cec8ef45fc706b33
|
7
|
+
data.tar.gz: bf455fe43aa269e43aa306e59526ac8dced5bdf33e2f32cee1c38cfc15fdf5deca3b30ffd1656cef0cf376cdbf92fb884666b89c6d23435523cc6a27c50c7bba
|
@@ -9,7 +9,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
9
9
|
|
10
10
|
Gem::Specification.new do |spec|
|
11
11
|
spec.name = "fluent-plugin-datadog-np"
|
12
|
-
spec.version = "0.10.6.
|
12
|
+
spec.version = "0.10.6.3"
|
13
13
|
spec.authors = ["Nicolas parfait"]
|
14
14
|
spec.email = [""]
|
15
15
|
spec.summary = "Datadog output plugin for Fluent event collector"
|
@@ -222,9 +222,21 @@ class Fluent::DatadogOutput < Fluent::BufferedOutput
|
|
222
222
|
def get_attribute_tags(record, attribute_tags)
|
223
223
|
if not attribute_tags.nil? and not record.nil?
|
224
224
|
tags = Array.new
|
225
|
+
# attributes are separated by ,
|
225
226
|
for attribute_tag in attribute_tags.split(",")
|
226
|
-
|
227
|
-
|
227
|
+
keyattr = attribute_tag.split(":")
|
228
|
+
# tag name is before :
|
229
|
+
key = keyattr.at(0)
|
230
|
+
# attribute name is after :
|
231
|
+
attr = keyattr.at(1)
|
232
|
+
|
233
|
+
# split attribute name by .
|
234
|
+
subrecord = record
|
235
|
+
attrparts = attr.split(".")
|
236
|
+
for index in (0...attrparts.length - 1)
|
237
|
+
subrecord = subrecord[attrparts[index]] unless subrecord[attrparts[index]].nil?
|
238
|
+
end
|
239
|
+
tags.push(key + ":" + subrecord[attrparts.at(attrparts.length - 1)]) unless subrecord[attrparts.at(attrparts.length - 1)].nil?
|
228
240
|
end
|
229
241
|
return tags.join(",")
|
230
242
|
end
|