sidekiq_prometheus 1.9.0 → 2.0.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: 654002b3b3138eef5307c4e4c3cab5a6d8ca45cc283c49341d3c1760f4d3ef67
4
- data.tar.gz: 5abf477f0a4a8baa64e82d22527477614d57f48c8bf26c4d637a7c24bbb5cc70
3
+ metadata.gz: e41a25aa249fbd72437fef36b40b8ff0328a31ebb588a3e6be32b66d4af8bb37
4
+ data.tar.gz: 79093b2be152a84f528a17e36866f49db59812dc3789d81dbda8fe7d7f2d6974
5
5
  SHA512:
6
- metadata.gz: 0544dc888a169886f532b2aa08ef8ab3c8c34ec1dea5a72bb9a75618aecfaaf4d1de81f6ae44cd61cc2621189ad69489a082f4af877cf63e7139ca3eb124a8dc
7
- data.tar.gz: 7eb8689d5514e3585a6ee722a5f21d6f964a56146750d922fa578164a72ffbb36415c47befb10f7f7c61cc82ada60c7a4200b55370cf74ceae72270f4b423d98
6
+ metadata.gz: b6018610e3dbf12324a123ad27f681771d93099a898ba454e9715cca4fa40fc9bccc96f3506ebd3df06501410ac3f4c8f838acbc207580a95f01c1e49187aa32
7
+ data.tar.gz: 765360b4f3e748592828c414a95afae77c30846569e0fa4dee21aae40af530dab2caf13b119befb2c0086b39c4b3e9c9a4c8a9e8b7417c89a05f1949fbf6ede1
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /tmp/
9
9
  .rspec_status
10
10
  Gemfile.lock
11
+ *gemfile.lock
11
12
  /.idea/
data/.travis.yml CHANGED
@@ -5,3 +5,6 @@ rvm:
5
5
  - 3.0
6
6
  - 2.7
7
7
  before_install: gem install bundler -v 2.2.15
8
+ gemfile:
9
+ - sidekiq_6.gemfile
10
+ - sidekiq_7.gemfile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  CHANGELOG
2
2
 
3
+ <a name="v1.9.0"></a>
4
+ ## [v1.9.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.8.3...v1.9.0) (2023-08-23)
5
+
6
+ ## What's Changed
7
+ * Adds info about sidekiq_job_over_limit metric to README by @ricardogpsf in https://github.com/fastly/sidekiq-prometheus/pull/38
8
+ * Allow label sets initialization while registering metrics by @davidbrusius in https://github.com/fastly/sidekiq-prometheus/pull/40
9
+
10
+ ## New Contributors
11
+ * @ricardogpsf made their first contribution in https://github.com/fastly/sidekiq-prometheus/pull/38
12
+ * @davidbrusius made their first contribution in https://github.com/fastly/sidekiq-prometheus/pull/40
13
+
14
+ **Full Changelog**: https://github.com/fastly/sidekiq-prometheus/compare/v1.8.3...v1.9.0
15
+
3
16
  <a name="v1.8.3"></a>
4
17
  ## [v1.8.3](https://github.com/fastly/sidekiq-prometheus/compare/v1.8.2...v1.8.3) (2023-01-30)
5
18
 
@@ -12,6 +12,7 @@
12
12
 
13
13
  begin
14
14
  require "sidekiq/component"
15
+ require "redis"
15
16
  rescue LoadError
16
17
  end
17
18
 
@@ -113,7 +114,11 @@ class SidekiqPrometheus::PeriodicMetrics
113
114
  # Records metrics from Redis
114
115
  def report_redis_metrics
115
116
  redis_info = begin
116
- Sidekiq.redis_info
117
+ if SidekiqPrometheus.sidekiq_seven?
118
+ Sidekiq.default_configuration.redis_info
119
+ else
120
+ Sidekiq.redis_info
121
+ end
117
122
  rescue Redis::BaseConnectionError
118
123
  nil
119
124
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqPrometheus
4
- VERSION = "1.9.0"
4
+ VERSION = "2.0.0"
5
5
  end
@@ -239,6 +239,10 @@ module SidekiqPrometheus
239
239
  )
240
240
  end
241
241
  end
242
+
243
+ def sidekiq_seven?
244
+ @sk7 ||= Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new("7.0")
245
+ end
242
246
  end
243
247
 
244
248
  class SidekiqPrometheus::Error < StandardError; end
data/sidekiq_6.gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in sidekiq_prometheus.gemspec
8
+ gemspec
9
+
10
+ gem "sidekiq", "< 7.0"
data/sidekiq_7.gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in sidekiq_prometheus.gemspec
8
+ gemspec
9
+
10
+ gem "sidekiq", "> 7.0"
@@ -28,7 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency "standard"
29
29
 
30
30
  spec.add_runtime_dependency "prometheus-client", ">= 2.0"
31
- spec.add_runtime_dependency "rack"
32
- spec.add_runtime_dependency "sidekiq", "> 5.1", "< 7.0"
31
+ spec.add_runtime_dependency "rack", "< 3.0"
32
+ spec.add_runtime_dependency "redis"
33
+ spec.add_runtime_dependency "sidekiq", "> 5.1"
33
34
  spec.add_runtime_dependency "webrick"
34
35
  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.9.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Eklund
@@ -97,6 +97,20 @@ dependencies:
97
97
  version: '2.0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rack
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "<"
103
+ - !ruby/object:Gem::Version
104
+ version: '3.0'
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "<"
110
+ - !ruby/object:Gem::Version
111
+ version: '3.0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: redis
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
116
  - - ">="
@@ -116,9 +130,6 @@ dependencies:
116
130
  - - ">"
117
131
  - !ruby/object:Gem::Version
118
132
  version: '5.1'
119
- - - "<"
120
- - !ruby/object:Gem::Version
121
- version: '7.0'
122
133
  type: :runtime
123
134
  prerelease: false
124
135
  version_requirements: !ruby/object:Gem::Requirement
@@ -126,9 +137,6 @@ dependencies:
126
137
  - - ">"
127
138
  - !ruby/object:Gem::Version
128
139
  version: '5.1'
129
- - - "<"
130
- - !ruby/object:Gem::Version
131
- version: '7.0'
132
140
  - !ruby/object:Gem::Dependency
133
141
  name: webrick
134
142
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +176,8 @@ files:
168
176
  - lib/sidekiq_prometheus/metrics.rb
169
177
  - lib/sidekiq_prometheus/periodic_metrics.rb
170
178
  - lib/sidekiq_prometheus/version.rb
179
+ - sidekiq_6.gemfile
180
+ - sidekiq_7.gemfile
171
181
  - sidekiq_prometheus.gemspec
172
182
  homepage: https://github.com/fastly/sidekiq-prometheus
173
183
  licenses: