fluent-plugin-datadog 0.14.2 → 0.14.4

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
  SHA256:
3
- metadata.gz: 48f262ed0beabe59655088c119c3d7fb732222dabfa116cf0709747a2349f033
4
- data.tar.gz: 0e1b786e5e5835021ec3d809172e837446633b0db216406d5a178ddb46f55533
3
+ metadata.gz: 926fa9b18f9ddafc71acdb33f6a35f9a8f5c8c349aa738c6772f37f4e678c27e
4
+ data.tar.gz: 334c768913c3bde058cba88d88bd10e343ff92d9d98be29b34efabfb94a3caf3
5
5
  SHA512:
6
- metadata.gz: 88508d03160cf04f76df7f933d42fccd4dacbaba90e2ec5e5857a9b1c26a7b2c6837e9d5aa183e7eaf4d1bbeaebe02eb04f7fb821c9e9597194f95e30a07bde9
7
- data.tar.gz: b9a6e5404fa3a058d3f227248dc1a00874d97689ca77bde92e38a25883eaaac22c221e00a8b4e6229d190030d7168c9823571f01cacc853fdd71ed2feb5bcba2
6
+ metadata.gz: 8d9919de155b21d18ac85eac0479565fec145468fa169a41b56a12d974ce4326e689cd1794e32f24561639d30561d7c56ef45abd81559191c1d257ff16bab7f4
7
+ data.tar.gz: 6449bf1033f5a217acf0598426e27aa82dbe546977eab926540bc82ff773a74a726ead6eaa0804b753ec26d42177c4cd843224bf160beca148cc653238b820e0
data/Rakefile CHANGED
@@ -4,3 +4,12 @@
4
4
  # Copyright 2018 Datadog, Inc.
5
5
 
6
6
  require "bundler/gem_tasks"
7
+ require 'rake/testtask'
8
+
9
+ task :default => [:test]
10
+
11
+ Rake::TestTask.new do |t|
12
+ t.libs << "test"
13
+ t.test_files = FileList['test/plugin/test*.rb']
14
+ t.verbose = true
15
+ end
@@ -31,4 +31,11 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "rake", "~> 12.0"
32
32
  spec.add_development_dependency "yajl-ruby", "~> 1.2"
33
33
  spec.add_development_dependency 'webmock', "~> 3.6.0"
34
+
35
+ spec.metadata = {
36
+ 'bug_tracker_uri' => 'https://github.com/DataDog/fluent-plugin-datadog/issues',
37
+ 'changelog_uri' => 'https://github.com/DataDog/fluent-plugin-datadog/blob/master/CHANGELOG.md',
38
+ 'documentation_uri' => 'https://github.com/DataDog/fluent-plugin-datadog/blob/master/README.md',
39
+ 'source_code_uri' => 'https://github.com/DataDog/fluent-plugin-datadog'
40
+ }
34
41
  end
@@ -11,6 +11,10 @@ require "fluent/plugin/output"
11
11
 
12
12
  require_relative "version"
13
13
 
14
+ def nilish?(s)
15
+ s.empty? || s == "nil" || s == "false" || s == "null"
16
+ end
17
+
14
18
  class Fluent::DatadogOutput < Fluent::Plugin::Output
15
19
  class RetryableError < StandardError;
16
20
  end
@@ -80,6 +84,8 @@ class Fluent::DatadogOutput < Fluent::Plugin::Output
80
84
  # Set dd_hostname if not already set (can be set when using fluentd as aggregator)
81
85
  @dd_hostname = %x[hostname -f 2> /dev/null].strip
82
86
  @dd_hostname = Socket.gethostname if @dd_hostname.empty?
87
+
88
+ @timestamp_key = nil if nilish?(@timestamp_key)
83
89
  end
84
90
 
85
91
  def multi_workers_ready?
@@ -420,6 +426,7 @@ class Fluent::DatadogOutput < Fluent::Plugin::Output
420
426
  tags.push("container_name:" + kubernetes['container_name']) unless kubernetes['container_name'].nil?
421
427
  tags.push("kube_namespace:" + kubernetes['namespace_name']) unless kubernetes['namespace_name'].nil?
422
428
  tags.push("pod_name:" + kubernetes['pod_name']) unless kubernetes['pod_name'].nil?
429
+ tags.push("container_id:" + kubernetes['docker_id']) unless kubernetes['docker_id'].nil?
423
430
  return tags.join(",")
424
431
  end
425
432
  nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatadogFluentPlugin
4
- VERSION = '0.14.2'
4
+ VERSION = '0.14.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.2
4
+ version: 0.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog Solutions Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2024-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -132,7 +132,11 @@ files:
132
132
  homepage: http://datadoghq.com
133
133
  licenses:
134
134
  - Apache-2.0
135
- metadata: {}
135
+ metadata:
136
+ bug_tracker_uri: https://github.com/DataDog/fluent-plugin-datadog/issues
137
+ changelog_uri: https://github.com/DataDog/fluent-plugin-datadog/blob/master/CHANGELOG.md
138
+ documentation_uri: https://github.com/DataDog/fluent-plugin-datadog/blob/master/README.md
139
+ source_code_uri: https://github.com/DataDog/fluent-plugin-datadog
136
140
  post_install_message:
137
141
  rdoc_options: []
138
142
  require_paths:
@@ -148,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
152
  - !ruby/object:Gem::Version
149
153
  version: '0'
150
154
  requirements: []
151
- rubyforge_project:
152
- rubygems_version: 2.7.10
155
+ rubygems_version: 3.3.15
153
156
  signing_key:
154
157
  specification_version: 4
155
158
  summary: Datadog output plugin for Fluent event collector