fluent-plugin-barito 0.4.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f97097933e7dbc552c68e40b0234a0fa7f9108bafd9e321bcc26280dcfbcb8f
4
- data.tar.gz: af17fc124d2cbbb527c4266124762c14983c96cd9b9dccf4882df0b2af66eca9
3
+ metadata.gz: 77b08876975a60787f945406ceef1c8c6885d6c14e9fce2f780e2a11aced749d
4
+ data.tar.gz: 3422b7d24b4c836dce95fd5987e793ca798fff91691dcf256ff2835253c1f558
5
5
  SHA512:
6
- metadata.gz: a219db3c564d4ebf65aa30b6b03f39c95a3f1ca50280332ee82beaae8c5a7b2068c7f21bc6297dee89bf7869b1cf20ab06476f438526bf143f66063158d251b9
7
- data.tar.gz: 26ae3bc887cd80141b64da29a2fabaee88d1da6e2cf3a8b4bafc1d9e272bd7f13c2f94fba128ccc7dfa5cce416edf35b17259d60e2d59b78acc6dda6ceaa7577
6
+ metadata.gz: 9eeb839e61e1a6cfb1eb8223138873e58063e7d546b2106d51dddceb063e1ae8894d8d23782081f3184e4adad8dcd4afc53632fec7d0371651b0c1739e4f42d8
7
+ data.tar.gz: 85657a49d27eeae2f4928c13c686e586d5349a31e62897a6b8e84687e5b8ef1b374b4c6b7951bfe8da8597f35325919d032188a35b7d85849f0d7d0208ab19a0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ **0.5.1**
4
+
5
+ - rename extralabels field to `additional_labels`
6
+
7
+ **0.5.0**
8
+
9
+ - Add extralabels field for additional information on client trail. e.g cloud_service_provider or else.
10
+
3
11
  **0.4.0**
4
12
 
5
13
  - Add custom output that can use dynamic application name format
@@ -11,7 +19,7 @@
11
19
  **0.3.4**
12
20
 
13
21
  - Add cluster name field (from k8s)
14
-
22
+
15
23
  **0.3.3**
16
24
 
17
25
  - Print verbose error on logs when receiving failed response from the server
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-barito"
6
- spec.version = "0.4.0"
6
+ spec.version = "0.5.1"
7
7
  spec.authors = ["BaritoLog"]
8
8
  spec.email = ["fadli.nurhasan@gmail.com", "gnu.iben@gmail.com"]
9
9
 
@@ -15,6 +15,7 @@ module Fluent
15
15
  config_param :application_name, :string, :default => nil
16
16
  config_param :produce_url, :string, :default => ''
17
17
  config_param :cluster_name, :string, :default => ''
18
+ config_param :additional_labels, :hash, :default => {}
18
19
 
19
20
  # Overide from BufferedOutput
20
21
  def start
@@ -51,6 +52,11 @@ module Fluent
51
52
  'host' => k8s_metadata['host'],
52
53
  'cluster_name' => @cluster_name
53
54
  }
55
+
56
+ # Add extra labels from config_params
57
+ unless @additional_labels.empty?
58
+ new_timber['client_trail'].merge!(@additional_labels)
59
+ end
54
60
 
55
61
  data['items'] << new_timber
56
62
  end
@@ -14,6 +14,7 @@ module Fluent
14
14
  config_param :application_group_secret, :string, :default => nil
15
15
  config_param :application_name, :string, :default => nil
16
16
  config_param :produce_url, :string, :default => ''
17
+ config_param :additional_labels, :hash, :default => {}
17
18
 
18
19
  # Overide from BufferedOutput
19
20
  def start
@@ -35,6 +36,11 @@ module Fluent
35
36
  trail = Fluent::Plugin::ClientTrail.new(false)
36
37
  timber = Fluent::Plugin::TimberFactory::create_timber(tag, time, record, trail)
37
38
 
39
+ # Add extra labels from config_params
40
+ unless @additional_labels.empty?
41
+ timber['client_trail'].merge!(@additional_labels)
42
+ end
43
+
38
44
  data['items'] << timber
39
45
  end
40
46
 
@@ -14,6 +14,7 @@ module Fluent
14
14
  config_param :application_group_secret, :string, :default => nil
15
15
  config_param :produce_url, :string, :default => ''
16
16
  config_param :cluster_name, :string, :default => ''
17
+ config_param :additional_labels, :hash, :default => {}
17
18
 
18
19
  # Overide from BufferedOutput
19
20
  def start
@@ -56,6 +57,11 @@ module Fluent
56
57
  'cluster_name' => @cluster_name
57
58
  }
58
59
 
60
+ # Add extra labels from config_params
61
+ unless @additional_labels.empty?
62
+ new_timber['client_trail'].merge!(@additional_labels)
63
+ end
64
+
59
65
  if data[application_name].nil?
60
66
  data[application_name] = { 'items' => [] }
61
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-barito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BaritoLog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-25 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler