fluent-plugin-label-router 0.2.7 → 0.2.8

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: 9fcacfb0c98686f99facd3bd94da5fa8065b4446cf1d2e5850a3e1456e5721d1
4
- data.tar.gz: 65f9d48cbf0636faa0544b052d16465760cc74c9a8fe3fb8aa378f122f7d0da6
3
+ metadata.gz: 214b0ab1c791ea384c2bc1f1f2e44f8f27ee23b0ba5b35c9d357e535f0ac4bda
4
+ data.tar.gz: 9dc61783f297966d51469a9716465a4cf37c62d2c1f7059c9175b3686709a694
5
5
  SHA512:
6
- metadata.gz: 6b1f0a77e69be61a6ade1329b4e1caa58dde56fdd0d2313bbfa54476342d5d04cacdbd71dac21f5b04ce191f5839624f25ff4d3c765f6d627a48e8c692b86bb8
7
- data.tar.gz: 3129f7a8a90f4d175941b9a719c96796245ed58bae0c0d60dbb42a608c310079b512aafb2385aebc7cee35b9df51c4bf781f3831696085f4438cce633c9e095a
6
+ metadata.gz: b55e88561ee31fe9dbdf6481c293be9337a8aab482031c00717a972a212785f263a382e3e05384b45efed6258c39f30a71099e80556e9f55b001933a735d58b3
7
+ data.tar.gz: d0e80aeba02b97c9a2bc2d17f991eac2baf8e53fb56d1a7f24dee60d528f97c5da417a4233e1f9d65c3ec5a9f71d749cfaa1da269db947ed262c4becfb65769d
@@ -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-label-router"
6
- spec.version = "0.2.7"
6
+ spec.version = "0.2.8"
7
7
  spec.authors = ["Banzai Cloud"]
8
8
  spec.email = ["info@banzaicloud.com"]
9
9
 
@@ -69,7 +69,7 @@ module Fluent
69
69
  @metrics_labels = (rule['metrics_labels'].map { |k, v| [k.to_sym, v] }.to_h if rule['metrics_labels'])
70
70
  @counter = nil
71
71
  unless registry.nil?
72
- @counter = registry.counter(:fluentd_router_records_total, docstring: "Total number of events router for the flow", labels: [:flow])
72
+ @counter = registry.counter(:fluentd_router_records_total, docstring: "Total number of events router for the flow", labels: [:flow, :id])
73
73
  end
74
74
  end
75
75
 
@@ -122,6 +122,7 @@ module Fluent
122
122
  else
123
123
  @router.emit(@tag, time, record)
124
124
  end
125
+ @counter&.increment(by: 1, labels: get_labels)
125
126
  end
126
127
 
127
128
  def emit_es(tag, es)
@@ -212,8 +212,10 @@ default_tag "new_tag"
212
212
  sub_test_case 'test_metrics' do
213
213
  test 'normal' do
214
214
  CONFIG4 = %[
215
+ @id xxx
215
216
  metrics true
216
217
  <route>
218
+ metrics_labels {"id": "test"}
217
219
  tag new_app_tag
218
220
  <match>
219
221
  labels
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-label-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Banzai Cloud