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 +4 -4
- data/fluent-plugin-prometheus.gemspec +1 -1
- data/lib/fluent/plugin/out_prometheus_metric.rb +7 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb9b4aefdd43a1100ac48ef5d0b390e07a9b93f48a771e633de4d3d665f820c3
|
4
|
+
data.tar.gz: 107a58876fa4292fafa674d8d5a3e4580d5043d3c03b4e7e26526d157875dd97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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)
|