sidekiq-cloudwatchmetrics 2.1.0 → 2.2.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: 7c0bc1eac7c14e56b549ea393000fa88306a086af44fcb76636a006af98113d4
4
- data.tar.gz: b94ff7bb5d16efd1930b966d61e3b2c939e645970d4b0b98a142529086adad2c
3
+ metadata.gz: fb8deb7fa07fddb75c82ec3b631a803c0d12bb67176e4c210675be9e5b5e2206
4
+ data.tar.gz: d4ea3bb0ecec06fdbe5e52f95f1bef2505bbc89550346301f5720f1750944335
5
5
  SHA512:
6
- metadata.gz: 832f4ab05b80ec74800986376b5c53f59b6ef909d1fc3fc634ec25d7818b962058be3a0e4f4be31c95c36fafd65c27f4ed59c89f906901abe143f02fd369adbf
7
- data.tar.gz: 26a7acfaea5ed47cdd848b64d119a06004efdc4aa9f0915cc8f11b817d854bdedf9bc970507097a365fc262d41647a685da765a45d3b0f126a9580afda6a4fd1
6
+ metadata.gz: f9568afd5661bb2f0520f109cbe671d85880cf834b919ee20813e7980bcee4426559b654596e352c23e3e3e5c1c5de8e7ffe918402d17aee225f59d122323a80
7
+ data.tar.gz: f4f68b369bc2cea9f565346f103cff7c1323bf05aa80572181b3a11100b7276ec999bd5b22f15261de000d0c6e33be52d17d80a70b5ec01c0267c9483b3d4a89
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -35,7 +35,7 @@ through environment variables that aws-sdk expects. You can also explicitly
35
35
  supply an [aws-sdk CloudWatch Client instance][cwclient]:
36
36
 
37
37
  ```ruby
38
- Sidekiq::CloudWatchMetrics.enable!(client: AWS::CloudWatch::Client.new)
38
+ Sidekiq::CloudWatchMetrics.enable!(client: Aws::CloudWatch::Client.new)
39
39
  ```
40
40
 
41
41
  [cwclient]: https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudWatch/Client.html
@@ -43,7 +43,7 @@ Sidekiq::CloudWatchMetrics.enable!(client: AWS::CloudWatch::Client.new)
43
43
  The default namespace for metrics is "Sidekiq". You can configure this with the `namespace` option:
44
44
 
45
45
  ```ruby
46
- Sidekiq::CloudWatchMetrics.enable!(client: AWS::CloudWatch::Client.new, namespace: "Sidekiq-Staging")
46
+ Sidekiq::CloudWatchMetrics.enable!(client: Aws::CloudWatch::Client.new, namespace: "Sidekiq-Staging")
47
47
  ```
48
48
 
49
49
 
@@ -156,6 +156,14 @@ module Sidekiq::CloudWatchMetrics
156
156
  value: process["busy"] / process["concurrency"].to_f * 100.0,
157
157
  unit: "Percent",
158
158
  }
159
+
160
+ metrics << {
161
+ metric_name: "Utilization",
162
+ dimensions: [{name: "Tag", value: process["tag"]}],
163
+ timestamp: now,
164
+ value: process["busy"] / process["concurrency"].to_f * 100.0,
165
+ unit: "Percent",
166
+ }
159
167
  end
160
168
 
161
169
  queues.each do |(queue_name, queue_size)|
@@ -183,7 +191,6 @@ module Sidekiq::CloudWatchMetrics
183
191
  metric[:dimensions] = (metric[:dimensions] || []) + @additional_dimensions
184
192
  end
185
193
  end
186
-
187
194
  # We can only put 20 metrics at a time
188
195
  metrics.each_slice(20) do |some_metrics|
189
196
  @client.put_metric_data(
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- {��$=�uW'YPQ�P �f�-�V6���Q�����ł�h���`݅�^r�b�Zo�Pe$v� �B���x1�Iu�ޜ��̅/7��E�8� ��;��ޙL�lݤ�%���$� .Ə��3����['p�1 �
1
+ ��-�(cp���],�}���]M��SӶ�� e���k{j��z��;G��NF+*�%��
2
+ 5r��.�J� v�}l]j`�����2I��kH�WrdT�$1�<u���� � �����j�"����8';8Ʀ�*Z����V��N�j��HD٫Nax�� K�q¶����XY�!/�>w�@WE�̻?�<[��Z�����]~E�x�EF~�%b9tO˻.=���.WE���O��
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.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Cochran
@@ -28,7 +28,7 @@ cert_chain:
28
28
  Tvf+pbX8JT9rawFDogxPhL7eRAbjg4MH9amp5l8HTVCAsW8vqv7wM4rtMNAaXmik
29
29
  LJghfDEf70fTtbs4Zv57pPhn1b7wBNf8fh+TZOlYAA6dFtQXoCwfE6bWgQU=
30
30
  -----END CERTIFICATE-----
31
- date: 2021-06-03 00:00:00.000000000 Z
31
+ date: 2022-02-24 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: sidekiq
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.1.4
169
+ rubygems_version: 3.1.6
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Publish Sidekiq metrics to AWS CloudWatch
metadata.gz.sig CHANGED
Binary file