fluent-plugin-elasticsearch-stats 0.8.1 → 0.9.0

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: f455fe813c548459990d5efa1da0cf2ca2a140ba01bdeb72e340056e10006385
4
- data.tar.gz: a168367d4820aae7027c481f4f9b66103825fc57e06fbe88f6b06f77017075a5
3
+ metadata.gz: b5c32208c725414ac9a41f920b0665ea2c861bff21257ace8703ad6bb86f582f
4
+ data.tar.gz: debd380f2b5ffd75c9e493b331a1c2e2d4bf173771a608d84e76ae75255cc393
5
5
  SHA512:
6
- metadata.gz: e6b399d9fbdcda310ccca3fe7fd5805b851a57e078e585b84d691f939d7ba413b9cddf799ac8b094e94d9dc22218de89e9402271629161e89351862dbbce1f57
7
- data.tar.gz: 3d42ab3d187b2ab7e0067e07e8f24de59e4d833cb367db44e32ef233490d31039947e8c94702066fce5a07f947dfe7288dbeabca5b4d020d411916a09a00b170
6
+ metadata.gz: f2d4de6fb32f987cd02933ac16c1711b70e144ad253d89e782342be621c275bcb996735aa5646157c0c8dbcab9d659bf3f2c1aeebc24c840dc2734d4ade83496
7
+ data.tar.gz: 73b0662af31804168bc50b9644447046f553cd5d27beab782a9a3845fca933e548c5d457a2b6fe22f6ae86e56da018039ce402009fb3c4717f84cc9f83bd6b1f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-elasticsearch-stats (0.8.1)
4
+ fluent-plugin-elasticsearch-stats (0.9.0)
5
5
  faraday (~> 2.9)
6
6
  faraday-retry (~> 2.2, >= 2.2.1)
7
7
  fluentd (>= 0.14.10, < 2)
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'fluent-plugin-elasticsearch-stats'
8
- spec.version = '0.8.1'
8
+ spec.version = '0.9.0'
9
9
  spec.authors = ['Thomas Tych']
10
10
  spec.email = ['thomas.tych@gmail.com']
11
11
 
@@ -144,8 +144,6 @@ module Fluent
144
144
  raise Fluent::ConfigError, 'tag should not be empty' if tag.empty?
145
145
  raise Fluent::ConfigError, 'urls should not be empty' if urls.empty?
146
146
 
147
- @mutex_emit = Mutex.new
148
-
149
147
  wrong_fields = aggregated_index_metrics.select { |item| ! ALLOWED_AGGREGATED_INDEX_METRICS.include?(item) }
150
148
  raise Fluent::ConfigError, "aggregated_index_metrics contains unexpected values: #{wrong_fields}" if wrong_fields.size > 0
151
149
 
@@ -190,21 +188,16 @@ module Fluent
190
188
  @elasticsearchs.each do |elasticsearch|
191
189
  threads << Thread.new do
192
190
  metrics = elasticsearch.collect_stats_metrics
193
- events = MultiEventStream.new(
194
- [Fluent::EventTime.now] * metrics.size,
195
- metrics
196
- )
197
- emit_events(events)
191
+ emit_metrics(metrics)
198
192
  end
199
193
  end
200
194
  threads.each(&:join)
201
195
  end
202
196
 
203
- def emit_events(events)
204
- return if !events || events.empty?
205
-
206
- @mutex_emit.synchronize do
207
- router.emit_stream(tag, events)
197
+ def emit_metrics(metrics)
198
+ emit_time = Fluent::EventTime.now
199
+ metrics.each do |metric|
200
+ router.emit(tag, emit_time, metric)
208
201
  end
209
202
  end
210
203
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Tych
@@ -249,7 +249,7 @@ licenses:
249
249
  metadata:
250
250
  homepage_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
251
251
  source_code_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
252
- documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.8.1
252
+ documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.9.0
253
253
  rubygems_mfa_required: 'true'
254
254
  rdoc_options: []
255
255
  require_paths: