sidekiq-cloudwatchmetrics 2.4.0 → 2.6.0

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
  SHA256:
3
- metadata.gz: 3a7b965ddae391fa045355a90b73aab7f57bdbde6447f9126fc0d7d4736c74bc
4
- data.tar.gz: ceb4ed049aa4c2e52bf813e14ed9b3a3763f470fc9205f40d6a5221b35a16bb9
3
+ metadata.gz: db3700f67618740e59e5d6b238c8ef38df7fff355b55720cbd8a3e3d8ddc4fe0
4
+ data.tar.gz: cc370653cf4e03aa2eef772b60063567409f10eeeedd90a4e24bfb67a445f951
5
5
  SHA512:
6
- metadata.gz: 82c7cb6ea74a0df7a1e21fbf5961c05dce7129179327e9a5b50568923766ac99e747bb10a45f950ad5b1266930c3f7c3e6a02d90cc370343dc301934dd3d5436
7
- data.tar.gz: a988deae4a7d902c291e6c6ee258459d3864d5da2672b685b783ab93b8e0140a0f54d26a51f75bcbc07b2e66a6962baf22c92659a3d10558432c56ae1287af17
6
+ metadata.gz: f6481c3015ff0d156677856c0851f34a35fad57718b9d493d096d38017b902ef12429f18a5e557fd6b1f1b5a0e32df6a7b805dea042a6620528aea76b42c72ec
7
+ data.tar.gz: f9b6755f2c04741b1704825d6a3a0b9950ea609da9784a77a622a9b99562857c0c81d9cada121ce8c05b148e0096c47e26be7036a05c5c864592b6749e80078f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -56,7 +56,7 @@ module Sidekiq::CloudWatchMetrics
56
56
  end
57
57
 
58
58
  def start
59
- logger.info { "Starting Sidekiq CloudWatch Metrics Publisher" }
59
+ logger.debug { "Starting Sidekiq CloudWatch Metrics Publisher" }
60
60
 
61
61
  @done = false
62
62
  @thread = safe_thread("cloudwatch metrics publisher", &method(:run))
@@ -73,7 +73,7 @@ module Sidekiq::CloudWatchMetrics
73
73
  now = Time.now.to_f
74
74
  tick = now
75
75
  until @stop
76
- logger.info { "Publishing Sidekiq CloudWatch Metrics" }
76
+ logger.debug { "Publishing Sidekiq CloudWatch Metrics" }
77
77
  publish
78
78
 
79
79
  now = Time.now.to_f
@@ -81,7 +81,7 @@ module Sidekiq::CloudWatchMetrics
81
81
  sleep(tick - now) if tick > now
82
82
  end
83
83
 
84
- logger.info { "Stopped Sidekiq CloudWatch Metrics Publisher" }
84
+ logger.debug { "Stopped Sidekiq CloudWatch Metrics Publisher" }
85
85
  end
86
86
 
87
87
  def publish
@@ -164,6 +164,24 @@ module Sidekiq::CloudWatchMetrics
164
164
  }
165
165
  end
166
166
 
167
+ processes.group_by do |process|
168
+ process["tag"]
169
+ end.each do |(tag, tag_processes)|
170
+ next if tag.nil?
171
+
172
+ tag_utilization = calculate_utilization(tag_processes) * 100.0
173
+
174
+ unless tag_utilization.nan?
175
+ metrics << {
176
+ metric_name: "Utilization",
177
+ dimensions: [{name: "Tag", value: tag}],
178
+ timestamp: now,
179
+ value: tag_utilization,
180
+ unit: "Percent",
181
+ }
182
+ end
183
+ end
184
+
167
185
  if @process_metrics
168
186
  processes.each do |process|
169
187
  process_utilization = process["busy"] / process["concurrency"].to_f * 100.0
@@ -239,12 +257,12 @@ module Sidekiq::CloudWatchMetrics
239
257
  end
240
258
 
241
259
  def quiet
242
- logger.info { "Quieting Sidekiq CloudWatch Metrics Publisher" }
260
+ logger.debug { "Quieting Sidekiq CloudWatch Metrics Publisher" }
243
261
  @stop = true
244
262
  end
245
263
 
246
264
  def stop
247
- logger.info { "Stopping Sidekiq CloudWatch Metrics Publisher" }
265
+ logger.debug { "Stopping Sidekiq CloudWatch Metrics Publisher" }
248
266
  @stop = true
249
267
  @thread.wakeup
250
268
  @thread.join
data.tar.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
-
2
- 0|����� W �|�7��m@Մwj����
3
- {�d��] ��oP�X}R�.-�������x^�?�F��W �`�x���];?��G,�5����vq
1
+ =�z�"�S�a,F����.��>���:�|����X�k���R�
2
+ �g�۩��ۮ����z�ɂ�"N��7����K'c�kW5�ض�\���F�?��noL���=1��v���𽪿��a��\
3
+ V��.U�xܔ]�jjL�NV�U#��B�W�P�f��Eys�W�\�_]0��;im8�
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: 2.4.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Cochran
@@ -10,26 +10,25 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDXDCCAkSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
13
+ MIIDKDCCAhCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
14
14
  MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0y
15
- MjA3MDQwMDQwNDZaFw0yMzA3MDQwMDQwNDZaMDoxDTALBgNVBAMMBHNqMjYxFDAS
15
+ MzA3MTIwODU1NTFaFw0yNDA3MTEwODU1NTFaMDoxDTALBgNVBAMMBHNqMjYxFDAS
16
16
  BgoJkiaJk/IsZAEZFgRzajI2MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkq
17
17
  hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr60Eo/ttCk8GMTMFiPr3GoYMIMFvLak
18
18
  xSmTk9YGCB6UiEePB4THSSA5w6IPyeaCF/nWkDp3/BAam0eZMWG1IzYQB23TqIM0
19
19
  1xzcNRvFsn0aQoQ00k+sj+G83j3T5OOV5OZIlu8xAChMkQmiPd1NXc6uFv+Iacz7
20
20
  kj+CMsI9YUFdNoU09QY0b+u+Rb6wDYdpyvN60YC30h0h1MeYbvYZJx/iZK4XY5zu
21
21
  4O/FL2ChjL2CPCpLZW55ShYyrzphWJwLOJe+FJ/ZBl6YXwrzQM9HKnt4titSNvyU
22
- KzE3L63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r
29
+ k6d9rkvRe0/YFTLB1hzK6scdAUcD91NOylY8s4cypQv/mk+OTbQ9+Xy7tyU=
31
30
  -----END CERTIFICATE-----
32
- date: 2023-03-07 00:00:00.000000000 Z
31
+ date: 2023-07-29 00:00:00.000000000 Z
33
32
  dependencies:
34
33
  - !ruby/object:Gem::Dependency
35
34
  name: sidekiq
metadata.gz.sig CHANGED
Binary file