metriks-addons 3.0.1 → 3.0.2
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/lib/metriks-addons/signalfx_reporter.rb +5 -18
- data/lib/metriks-addons.rb +1 -1
- data/metriks-addons.gemspec +2 -2
- data/spec/signalfx_spec.rb +14 -63
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b87ff8ce94b283989659aee055996133bd0b9d6e
|
4
|
+
data.tar.gz: b32c67b731da0fe2838466015dacf5afe80fdf8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58fa4a57073b07d8de67961c971580b9858cf54ed044f654bce361d6cf5c802286ae91321fc17f7025cd6a9a1bbdb96d14f25397aa550a8934714742bac9c897
|
7
|
+
data.tar.gz: 475d780d15e849204f9448409bd259017edef32d39853fe6a2f4bfc01399ba2dddc73ab7e951474f33b02d1ec5c4f8fdd92698b09c7654863558ffeb82b7da5d
|
@@ -37,7 +37,7 @@ module MetriksAddons
|
|
37
37
|
response = RestClient.post "#{@hostname}?orgid=#{@orgid}",
|
38
38
|
jsonstr,
|
39
39
|
:content_type => :json, :accept => :json, :'X-SF-TOKEN' => @x_sf_token
|
40
|
-
log "
|
40
|
+
log "debug", "Sent #{datapoints.size} metrics to SignalFX"
|
41
41
|
log "debug", "Response is: #{response}"
|
42
42
|
end
|
43
43
|
|
@@ -68,25 +68,12 @@ module MetriksAddons
|
|
68
68
|
gauge |= create_datapoints name, metric, time, [
|
69
69
|
:value
|
70
70
|
]
|
71
|
-
when Metriks::
|
71
|
+
when Metriks::Timer
|
72
72
|
counter |= create_datapoints name, metric, time, [
|
73
|
-
:count
|
74
|
-
:mean_utilization
|
75
|
-
], [
|
76
|
-
:median
|
77
|
-
]
|
78
|
-
|
79
|
-
when Metriks::Timer
|
80
|
-
counter |= create_datapoints name, metric, time, [
|
81
|
-
:count, :mean_rate, :min, :max, :mean, :stddev
|
82
|
-
], [
|
83
|
-
:median
|
73
|
+
:count
|
84
74
|
]
|
85
|
-
|
86
|
-
|
87
|
-
:count, :min, :max, :mean, :stddev
|
88
|
-
], [
|
89
|
-
:median
|
75
|
+
gauge |= create_datapoints name, metric, time, [
|
76
|
+
:min, :max, :mean
|
90
77
|
]
|
91
78
|
end
|
92
79
|
end
|
data/lib/metriks-addons.rb
CHANGED
data/metriks-addons.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'metriks-addons'
|
16
|
-
s.version = '3.0.
|
17
|
-
s.date = '2015-11-
|
16
|
+
s.version = '3.0.2'
|
17
|
+
s.date = '2015-11-17'
|
18
18
|
|
19
19
|
## Make sure your summary is short. The description may be as long
|
20
20
|
## as you like.
|
data/spec/signalfx_spec.rb
CHANGED
@@ -50,76 +50,27 @@ describe "Smoke test" do
|
|
50
50
|
it "timer" do
|
51
51
|
@registry.timer('timer.testing').update(1.5)
|
52
52
|
datapoints = @reporter.get_datapoints
|
53
|
-
expect(datapoints[:counter].size).to eql(
|
53
|
+
expect(datapoints[:counter].size).to eql(1)
|
54
|
+
expect(datapoints[:gauge].size).to eql(3)
|
54
55
|
expect(datapoints[:counter][0][:metric]).to eql("timer.testing.count")
|
55
56
|
expect(datapoints[:counter][0][:value]).to eql(1)
|
56
57
|
expect(datapoints[:counter][0][:dimensions]).to include(:env => "test")
|
57
58
|
expect(datapoints[:counter][0][:timestamp]).not_to be_nil
|
58
59
|
|
59
|
-
expect(datapoints[:
|
60
|
-
expect(datapoints[:
|
61
|
-
expect(datapoints[:
|
62
|
-
expect(datapoints[:
|
63
|
-
|
64
|
-
expect(datapoints[:counter][2][:metric]).to eql("timer.testing.min")
|
65
|
-
expect(datapoints[:counter][2][:value]).not_to be_nil
|
66
|
-
expect(datapoints[:counter][2][:dimensions]).to include(:env => "test")
|
67
|
-
expect(datapoints[:counter][2][:timestamp]).not_to be_nil
|
68
|
-
|
69
|
-
expect(datapoints[:counter][3][:metric]).to eql("timer.testing.max")
|
70
|
-
expect(datapoints[:counter][3][:value]).not_to be_nil
|
71
|
-
expect(datapoints[:counter][3][:dimensions]).to include(:env => "test")
|
72
|
-
expect(datapoints[:counter][3][:timestamp]).not_to be_nil
|
73
|
-
|
74
|
-
expect(datapoints[:counter][4][:metric]).to eql("timer.testing.mean")
|
75
|
-
expect(datapoints[:counter][4][:value]).not_to be_nil
|
76
|
-
expect(datapoints[:counter][4][:dimensions]).to include(:env => "test")
|
77
|
-
expect(datapoints[:counter][4][:timestamp]).not_to be_nil
|
78
|
-
|
79
|
-
expect(datapoints[:counter][5][:metric]).to eql("timer.testing.stddev")
|
80
|
-
expect(datapoints[:counter][5][:value]).not_to be_nil
|
81
|
-
expect(datapoints[:counter][5][:dimensions]).to include(:env => "test")
|
82
|
-
expect(datapoints[:counter][5][:timestamp]).not_to be_nil
|
83
|
-
|
84
|
-
expect(datapoints[:counter][6][:metric]).to eql("timer.testing.median")
|
85
|
-
expect(datapoints[:counter][6][:value]).not_to be_nil
|
86
|
-
expect(datapoints[:counter][6][:dimensions]).to include(:env => "test")
|
87
|
-
expect(datapoints[:counter][6][:timestamp]).not_to be_nil
|
88
|
-
end
|
89
|
-
|
90
|
-
it "histogram" do
|
91
|
-
@registry.histogram('histogram.testing').update(1.5)
|
92
|
-
datapoints = @reporter.get_datapoints
|
93
|
-
expect(datapoints[:counter].size).to eql(6)
|
94
|
-
expect(datapoints[:counter][0][:metric]).to eql("histogram.testing.count")
|
95
|
-
expect(datapoints[:counter][0][:value]).to eql(1)
|
96
|
-
expect(datapoints[:counter][0][:dimensions]).to include(:env => "test")
|
97
|
-
expect(datapoints[:counter][0][:timestamp]).not_to be_nil
|
98
|
-
|
99
|
-
expect(datapoints[:counter][1][:metric]).to eql("histogram.testing.min")
|
100
|
-
expect(datapoints[:counter][1][:value]).not_to be_nil
|
101
|
-
expect(datapoints[:counter][1][:dimensions]).to include(:env => "test")
|
102
|
-
expect(datapoints[:counter][1][:timestamp]).not_to be_nil
|
103
|
-
|
104
|
-
expect(datapoints[:counter][2][:metric]).to eql("histogram.testing.max")
|
105
|
-
expect(datapoints[:counter][2][:value]).not_to be_nil
|
106
|
-
expect(datapoints[:counter][2][:dimensions]).to include(:env => "test")
|
107
|
-
expect(datapoints[:counter][2][:timestamp]).not_to be_nil
|
108
|
-
|
109
|
-
expect(datapoints[:counter][3][:metric]).to eql("histogram.testing.mean")
|
110
|
-
expect(datapoints[:counter][3][:value]).not_to be_nil
|
111
|
-
expect(datapoints[:counter][3][:dimensions]).to include(:env => "test")
|
112
|
-
expect(datapoints[:counter][3][:timestamp]).not_to be_nil
|
60
|
+
expect(datapoints[:gauge][0][:metric]).to eql("timer.testing.min")
|
61
|
+
expect(datapoints[:gauge][0][:value]).not_to be_nil
|
62
|
+
expect(datapoints[:gauge][0][:dimensions]).to include(:env => "test")
|
63
|
+
expect(datapoints[:gauge][0][:timestamp]).not_to be_nil
|
113
64
|
|
114
|
-
expect(datapoints[:
|
115
|
-
expect(datapoints[:
|
116
|
-
expect(datapoints[:
|
117
|
-
expect(datapoints[:
|
65
|
+
expect(datapoints[:gauge][1][:metric]).to eql("timer.testing.max")
|
66
|
+
expect(datapoints[:gauge][1][:value]).not_to be_nil
|
67
|
+
expect(datapoints[:gauge][1][:dimensions]).to include(:env => "test")
|
68
|
+
expect(datapoints[:gauge][1][:timestamp]).not_to be_nil
|
118
69
|
|
119
|
-
expect(datapoints[:
|
120
|
-
expect(datapoints[:
|
121
|
-
expect(datapoints[:
|
122
|
-
expect(datapoints[:
|
70
|
+
expect(datapoints[:gauge][2][:metric]).to eql("timer.testing.mean")
|
71
|
+
expect(datapoints[:gauge][2][:value]).not_to be_nil
|
72
|
+
expect(datapoints[:gauge][2][:dimensions]).to include(:env => "test")
|
73
|
+
expect(datapoints[:gauge][2][:timestamp]).not_to be_nil
|
123
74
|
end
|
124
75
|
|
125
76
|
it "gauge" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metriks-addons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajat Venkatesh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metriks
|