sidekiq_prometheus 1.8.0 → 1.8.1

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: 564b12c7284161a3350d677f809da15ca5d70b0b2a9eb5303970639cb85aeedb
4
- data.tar.gz: 99c3995589218b36b0016d7585bedf17a4ac783fdfa4efb306b5bffbd8c6e766
3
+ metadata.gz: 99f2c02a2ecdac71a05de9212319cc8efafb5e15d39d1a46d9dcd60d32ff847d
4
+ data.tar.gz: b43c963a8c63ca92ad695a8a5ef191701a2486772aaea24ad333ad6aacf66363
5
5
  SHA512:
6
- metadata.gz: 261e2cc263e08cf1d5784c63a2af38855db615f995f5d66f5b8c8c837e80fe22c0a5f2c6a85671c7bc1c4144a5b5ca816916088a77281ffd5e099ebf1da07a23
7
- data.tar.gz: 6bccef33e7d74236fdad77eb93072f02804e838c5dc6760b26e7ed624667b1a73d0ebce1170469ce60345d2fed43bb1c2fab615e202c6fe4a76388b11d8e6054
6
+ metadata.gz: 74a9dda61a073d84576614a107966b9e6f714896b1925b1a2983f8f5ff64d2fa4f19007b47eaa6926f9f8a76cd0162a4c95dc11e97b11b9d40d9804ed6765d69
7
+ data.tar.gz: d7d1784f6aa693eb0e96613d2f0af6ee49d26e11f6d061c61dc7c75e73c12760fbc95b4e526c6b8d017083a7a5c518b79fa0c339266c60d9e2c6611a702bd641
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  CHANGELOG
2
2
 
3
+ <a name="v1.8.0"></a>
4
+ ## [v1.8.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.7.0...v1.8.0) (2022-10-04)
5
+
6
+ ### Features
7
+
8
+ * handle rate limiting exceptions distinctly from other exceptions ([#28](https://github.com/fastly/sidekiq-prometheus/issues/28))
9
+
10
+ ### Pull Requests
11
+
12
+ * Merge pull request [#27](https://github.com/fastly/sidekiq-prometheus/issues/27) from pinkahd/patch-1
13
+
14
+
3
15
  <a name="v1.7.0"></a>
4
16
  ## [v1.7.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.6.0...v1.7.0) (2022-09-29)
5
17
 
data/README.md CHANGED
@@ -75,8 +75,8 @@ end
75
75
 
76
76
  #### Configuration options
77
77
 
78
- * `preset_labels`: Hash of labels that will be included with every metric when they are registered.
79
- * `custom_labels`: Array of names for each label that will be passed during the reporting.
78
+ * `preset_labels`: Hash of labels that will be included with every metric when they are registered. `Hash{Symbol (label name) => String (label value)}`
79
+ * `custom_labels`: Hash of metrics and labels that can be applied to specific metrics. The metric name must be a registered metric. `Hash{Symbol (metric name) => Array<Symbol> (label names)}`
80
80
  * `gc_metrics_enabled`: Boolean that determines whether to record object allocation metrics per job. The default is `true`. Setting this to `false` if you don't need this metric.
81
81
  * `global_metrics_enabled`: Boolean that determines whether to report global metrics from the PeriodicMetrics reporter. When `true` this will report on a number of stats from the Sidekiq API for the cluster. This requires Sidekiq::Enterprise as the reporter uses the leader election functionality to ensure that only one worker per cluster is reporting metrics.
82
82
  * `periodic_metrics_enabled`: Boolean that determines whether to run the periodic metrics reporter. `PeriodicMetrics` runs a separate thread that reports on global metrics (if enabled) as well worker GC stats (if enabled). It reports metrics on the interval defined by `periodic_reporting_interval`. Defaults to `true`.
@@ -91,7 +91,7 @@ end
91
91
  ```ruby
92
92
  SidekiqPrometheus.configure do |config|
93
93
  config.preset_labels = { service: 'myapp' }
94
- config.custom_labels = [:worker_class, :job_type, :any_other_label]
94
+ config.custom_labels = { sidekiq_job_count: [:worker_class, :job_type, :any_other_label] }
95
95
  config.gc_metrics_enabled = false
96
96
  config.global_metrics_enabled = true
97
97
  config.periodic_metrics_enabled = true
@@ -254,11 +254,7 @@ To install this gem onto your local machine, run `bundle exec rake install`.
254
254
 
255
255
  ## Contributors
256
256
 
257
- * Lukas Eklund ([@leklund](https://github.com/leklund))
258
- * NHM Tanveer Hossain Khan ([@we4tech](https://github.com/we4tech))
259
- * [@Postmodern](https://github.com/postmodern)
260
- * Ross Jones ([@rossjones](https://github.com/rossjones))
261
- * Alejandro Arrufat ([@mirubiri](https://github.com/mirubiri))
257
+ See: https://github.com/fastly/sidekiq-prometheus/graphs/contributors
262
258
 
263
259
  ## Contributing
264
260
 
@@ -44,7 +44,11 @@ class SidekiqPrometheus::PeriodicMetrics
44
44
  @sidekiq_queue = sidekiq_queue
45
45
  @senate = if senate.nil?
46
46
  if Object.const_defined?('Sidekiq::Senate')
47
- Sidekiq::Senate
47
+ if Sidekiq::Senate.respond_to?(:leader?)
48
+ Sidekiq::Senate
49
+ else
50
+ Sidekiq::Senate.new(Sidekiq)
51
+ end
48
52
  else
49
53
  Senate
50
54
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqPrometheus
4
- VERSION = '1.8.0'
4
+ VERSION = '1.8.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_prometheus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Eklund
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-10-04 00:00:00.000000000 Z
12
+ date: 2022-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler