fluent-plugin-prometheus-smarter 1.8.8 → 1.8.9

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: 904ceb8c9a6dcdfda9097376e1f7f062cf492d706a58d414a519bdcba4c382e1
4
- data.tar.gz: 45e1900ff6ba67a8d2cbc9babc5a1a6c1a767bac77a32d1b5ed9fe77ae4a79c3
3
+ metadata.gz: cb9b4aefdd43a1100ac48ef5d0b390e07a9b93f48a771e633de4d3d665f820c3
4
+ data.tar.gz: 107a58876fa4292fafa674d8d5a3e4580d5043d3c03b4e7e26526d157875dd97
5
5
  SHA512:
6
- metadata.gz: 40ebd10e85ff102df511549e8b7d8b51065958d6a255c9426145cd5b51ed2c9b0ed23ae0eacabe13561ce4ce25f3fcc69ad4604971ab6411412c8bae8c2bd1b3
7
- data.tar.gz: 9b4efa8151750df48151178fa616d7ea0ce13bd65c0f4f4aba6be4313a6165750a3918b1d6fddf41951babb2f9678ce502d88a49bdd022b6c12bd950416f10df
6
+ metadata.gz: 2f04313bee13f5630924dbf1a1492a1d5b08cf582c5850e0c849f98b89243f8771db6e8e1b3d353d451fd948f04cb79f9e09179b30a6e428dc9ab7e904d4f980
7
+ data.tar.gz: a76082fbcf062ef3c9f52eb35e49e9b042d65405b0449286425b43e784d0c1ed08af3d8091ae59bf6ecf7244ac4494aadc54c7e9ad14a75e4e93b81187833716
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "fluent-plugin-prometheus-smarter"
3
- spec.version = "1.8.8"
3
+ spec.version = "1.8.9"
4
4
  spec.authors = ["Masahiro Sano", "Josh Minor"]
5
5
  spec.email = ["jishminor@gmail.com"]
6
6
  spec.summary = %q{A fluent plugin that collects metrics and exposes for Prometheus.}
@@ -42,17 +42,16 @@ module Fluent::Plugin
42
42
  'tag' => tag,
43
43
  'worker_id' => fluentd_worker_id,
44
44
  }
45
-
46
- # Create metric if not exists
47
- begin
48
- desc = "fluentd message stream with tag: ${tag}"
49
- gauge = @registry.gauge(tag.to_sym, desc.sub!("${tag}", tag))
50
- rescue ::Prometheus::Client::Registry::AlreadyRegisteredError
51
- gauge = @registry.get(tag.to_sym)
52
- end
53
45
 
54
46
  # Write out values in event stream to Registry
55
47
  es.each do |time, record|
48
+ # Create metric if not exists
49
+ begin
50
+ desc = "fluentd message stream with tag: ${tag}"
51
+ gauge = @registry.gauge(tag.to_sym, desc.sub!("${tag}", tag))
52
+ rescue ::Prometheus::Client::Registry::AlreadyRegisteredError
53
+ gauge = @registry.get(tag.to_sym)
54
+ end
56
55
  placeholders = record.merge(placeholder_values)
57
56
  expander = @placeholder_expander_builder.build(placeholders)
58
57
  if @key.is_a?(String)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-prometheus-smarter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.8
4
+ version: 1.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Sano