fluent-plugin-metricsense 0.2.9 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0384f5c3b535a891f4bb0db095cc24f79e30f67
4
- data.tar.gz: 4f19608ea60b9ad3f9d705e06d818a79237f64f8
3
+ metadata.gz: 65dde35b20a1bc73ef983a9d028583d58db91b24
4
+ data.tar.gz: 186f4fab1b1f69751fd71c90df6bbb5aac49acb9
5
5
  SHA512:
6
- metadata.gz: 58ec2daa77a70530eecbae3aab2e8e3c3dfaf11170f423ced04003061ab086b8f88b6accc07bac428a7e68a13be4644baf9178121eaace542dc2ee4fa6aa0fa2
7
- data.tar.gz: cd20552ce0fe91dd253609126953cacbeb0bce7473c0457ab6053ac473a46bc16cac227ed43d0a7871f3aa6d66c2212c109a20b8b31c53e8847520cd2838dd98
6
+ metadata.gz: 358a622162f2723b32ee016f923ada61b7441ff1e85f7e72358ef95137cd1e4b154e062fa7b73cb7666b5947f67fd34a127571afc486f96912db12d8ae87c20f
7
+ data.tar.gz: f9b78239fc15f68e2f30c78cda93eace824dfb88f42daf18bedd386af785dc40f89510db8ac442b300d75ee196409153a8da6105848201b27fd6673dc388bf58
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.9
1
+ 0.2.11
@@ -49,12 +49,13 @@ module Fluent::MetricSenseOutput::Backends
49
49
  slice.each do |tag, time, value, seg_key, seg_val|
50
50
  if seg_key and seg_val
51
51
  # segmented values
52
+ metric = "#{tag}_by_#{seg_key}"
52
53
  segment = "#{seg_key}:#{seg_val}"
53
54
  else
54
55
  # simple values
55
- segment = "simple"
56
+ metric = tag
57
+ segment = ""
56
58
  end
57
- metric = tag # use fluentd's tag as metric name on datadog
58
59
  metric_points[metric] ||= {}
59
60
  metric_points[metric][segment] ||= []
60
61
  metric_points[metric][segment].push([Time.at(time), value])
@@ -62,13 +63,9 @@ module Fluent::MetricSenseOutput::Backends
62
63
 
63
64
  metric_points.each do |metric, segment_points|
64
65
  segment_points.each do |segment, points|
65
- seg_key, seg_val = segment.split(":", 2)
66
-
67
66
  tags = @tags.dup
68
- tags.push(segment)
69
- if seg_key and seg_val
70
- # add seg_key as a tag to allow calculating metrics over the segment name
71
- tags.push(seg_key)
67
+ if segment and not segment.empty?
68
+ tags.push(segment)
72
69
  end
73
70
 
74
71
  options = {}
@@ -209,15 +209,15 @@ module Fluent
209
209
  @value = 0
210
210
  end
211
211
  attr_reader :value
212
-
212
+
213
213
  def normalized_value(n)
214
214
  @value
215
215
  end
216
-
216
+
217
217
  def add(value)
218
218
  @value += 1
219
219
  end
220
-
220
+
221
221
  def mode
222
222
  UpdateMode::ADD
223
223
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-metricsense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi