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 +4 -4
- data/VERSION +1 -1
- data/fluent-plugin-metricsense.gemspec +1 -1
- data/lib/fluent/plugin/backends/datadog_backend.rb +19 -22
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dd6ab4f7b2fa39712c9ad5f13ecb744d36c7a4f
|
4
|
+
data.tar.gz: 4b64a429413ccf16f5ee3777efc4125b19318103
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c59f0a0addc0c5604a5bfe8892ed5a808ce18f5ecf28a06ac6fca144a961583de708990d9830a6a952386c77c1254b1114b8753a749d2671f4fbbac29feb763a
|
7
|
+
data.tar.gz: e3ef2c3e6bc5e0986a93a830715373599e471cb5f05c7fbdfa11c8a4212ede895ef999fc7d8b2ac915e34d4c0219db2d6f114264454fa21734dbc34cfd5f6569
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
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", "
|
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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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.
|
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-
|
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
|