sidekiq-cloudwatchmetrics 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/sidekiq/cloudwatchmetrics.rb +19 -11
- metadata +3 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e3991b16a0ac40b697bd24d4efee3192a8d9bb5ca4c252e2f5cd6135843800d
|
4
|
+
data.tar.gz: 53107e6b0601740c0133b1f95396863cb3853d46628d2b4f575102aa496d4110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24311c4a2dca677378aa1a0b44ed33e7957b2e445c9ea39a20de21efb30acf8fc388912a9805c59651d44b822a25205a23f87d85f692d64489d020f29b6f8275
|
7
|
+
data.tar.gz: 188acd1c12c6b69315fb17b778ba9e56dadf7e1d05c8af0b8eb84dcddf48ce30cb9bae795ee266a60f0a0fdef1982081b0e0c3eb5cf850e310194ef296457b17
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -75,8 +75,6 @@ module Sidekiq::CloudWatchMetrics
|
|
75
75
|
now = Time.now
|
76
76
|
stats = Sidekiq::Stats.new
|
77
77
|
processes = Sidekiq::ProcessSet.new.to_enum(:each).to_a
|
78
|
-
utilization = calculate_utilization(processes)
|
79
|
-
capacity = calculate_capacity(processes)
|
80
78
|
queues = stats.queues
|
81
79
|
|
82
80
|
metrics = [
|
@@ -128,27 +126,37 @@ module Sidekiq::CloudWatchMetrics
|
|
128
126
|
value: stats.processes_size,
|
129
127
|
unit: "Count",
|
130
128
|
},
|
129
|
+
{
|
130
|
+
metric_name: "DefaultQueueLatency",
|
131
|
+
timestamp: now,
|
132
|
+
value: stats.default_queue_latency,
|
133
|
+
unit: "Seconds",
|
134
|
+
},
|
131
135
|
{
|
132
136
|
metric_name: "Capacity",
|
133
137
|
timestamp: now,
|
134
|
-
value:
|
138
|
+
value: calculate_capacity(processes),
|
135
139
|
unit: "Count",
|
136
140
|
},
|
137
141
|
{
|
138
142
|
metric_name: "Utilization",
|
139
143
|
timestamp: now,
|
140
|
-
value:
|
144
|
+
value: calculate_utilization(processes) * 100.0,
|
141
145
|
unit: "Percent",
|
142
146
|
},
|
143
|
-
{
|
144
|
-
metric_name: "DefaultQueueLatency",
|
145
|
-
timestamp: now,
|
146
|
-
value: stats.default_queue_latency,
|
147
|
-
unit: "Seconds",
|
148
|
-
},
|
149
147
|
]
|
150
148
|
|
151
|
-
|
149
|
+
processes.each do |process|
|
150
|
+
metrics << {
|
151
|
+
metric_name: "Utilization",
|
152
|
+
dimensions: [{name: "Hostname", value: process["hostname"]}],
|
153
|
+
timestamp: now,
|
154
|
+
value: process["busy"] / process["concurrency"].to_f * 100.0,
|
155
|
+
unit: "Percent",
|
156
|
+
}
|
157
|
+
end
|
158
|
+
|
159
|
+
queues.each do |(queue_name, queue_size)|
|
152
160
|
metrics << {
|
153
161
|
metric_name: "QueueSize",
|
154
162
|
dimensions: [{name: "QueueName", value: queue_name}],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-cloudwatchmetrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Cochran
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
ccrr0sGoLnfK6DappOwH1I5uPvQohOATNmmU0MSSWOeiggLlEWmUYE7CvzoMc8R6
|
29
29
|
DlumKi5y9wE+XnxtyLbe6GlT3AkVGnhwPdwq2QBFLEWkTVogdCYomBCKfjY=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
31
|
+
date: 2019-01-21 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: sidekiq
|
@@ -146,8 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
|
150
|
-
rubygems_version: 2.7.7
|
149
|
+
rubygems_version: 3.0.2
|
151
150
|
signing_key:
|
152
151
|
specification_version: 4
|
153
152
|
summary: Publish Sidekiq metrics to AWS CloudWatch
|
metadata.gz.sig
CHANGED
Binary file
|