fluent-plugin-metricsense 0.2.13 → 0.2.14

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: 59764f3c7ed4fbb6497511dfbb4192a00a99fc68
4
- data.tar.gz: 6bd4a75bad047e5ddb75b254cfd3b61e0b9ba6f7
3
+ metadata.gz: 8dd6ab4f7b2fa39712c9ad5f13ecb744d36c7a4f
4
+ data.tar.gz: 4b64a429413ccf16f5ee3777efc4125b19318103
5
5
  SHA512:
6
- metadata.gz: 2af8c1065e6fb16a8072dd519bc18b542c096a1503eabdea24db3984afab92a863af5e8c3dfe4c98c5173da503aa6e6ca709b7e8208d89079cedab878b8e28a2
7
- data.tar.gz: f9b5f6559aed2936f955571a41f07536c8d5ebe81ae733b2bc979df2a45a28bf953903019beca9a54aae95ddd310dd23979cb69facede28e5df8b47d2e277559
6
+ metadata.gz: c59f0a0addc0c5604a5bfe8892ed5a808ce18f5ecf28a06ac6fca144a961583de708990d9830a6a952386c77c1254b1114b8753a749d2671f4fbbac29feb763a
7
+ data.tar.gz: e3ef2c3e6bc5e0986a93a830715373599e471cb5f05c7fbdfa11c8a4212ede895ef999fc7d8b2ac915e34d4c0219db2d6f114264454fa21734dbc34cfd5f6569
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.13
1
+ 0.2.14
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
 
19
- s.add_dependency "fluentd", "~> 0.10.6"
19
+ s.add_dependency "fluentd", ">= 0.10.6"
20
20
  s.add_dependency "dogapi"
21
21
  s.add_development_dependency "rake", ">= 0.8.7"
22
22
  s.add_development_dependency 'bundler', ['>= 1.0.0']
@@ -62,30 +62,27 @@ module Fluent::MetricSenseOutput::Backends
62
62
  metric_points[metric][segment].push([Time.at(time), value])
63
63
  end
64
64
 
65
- metric_points.each do |metric, segment_points|
66
- segment_points.each do |segment, points|
67
- tags = @tags.dup
68
- if segment and not segment.empty?
69
- tags.push(segment)
70
- end
71
-
72
- options = {}
73
- options[:tags] = tags
74
- options[:host] = @host if @host
75
- options[:type] = "gauge"
76
-
77
- log.debug("datadog emit points: metric=#{metric}, points=#{points.inspect}, options=#{options.inspect}")
78
- begin
79
- code, response = @dog.emit_points(metric, points, options)
80
- rescue Exception => error
81
- # dogapi may raise an Exception.
82
- # fluentd expects StandardError as retriable error, though.
83
- raise("datadog error: #{error.class}: #{error.message}")
84
- end
85
- if code.to_i / 100 != 2
86
- raise("datadog error: HTTP #{code}: #{response.inspect}")
65
+ begin
66
+ log.debug("sending #{metric_points.length} metric(s) to datadog...")
67
+ @dog.batch_metrics do
68
+ metric_points.each do |metric, segment_points|
69
+ segment_points.each do |segment, points|
70
+ tags = @tags.dup
71
+ if segment and not segment.empty?
72
+ tags.push(segment)
73
+ end
74
+ options = {}
75
+ options[:tags] = tags
76
+ options[:host] = @host if @host
77
+ options[:type] = "gauge"
78
+ @dog.emit_points(metric, points, options)
79
+ end
87
80
  end
88
81
  end
82
+ rescue Exception => error
83
+ # dogapi may raise an Exception.
84
+ # fluentd expects StandardError as retriable error, though.
85
+ raise("datadog error: #{error.class}: #{error.message}")
89
86
  end
90
87
  end
91
88
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-metricsense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-02 00:00:00.000000000 Z
11
+ date: 2015-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.10.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.10.6
27
27
  - !ruby/object:Gem::Dependency