sidekiq_prometheus 1.9.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +28 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +21 -0
- data/README.md +1 -5
- data/lib/sidekiq_prometheus/job_metrics.rb +1 -1
- data/lib/sidekiq_prometheus/periodic_metrics.rb +6 -1
- data/lib/sidekiq_prometheus/version.rb +1 -1
- data/lib/sidekiq_prometheus.rb +4 -0
- data/sidekiq_6.gemfile +10 -0
- data/sidekiq_7.gemfile +10 -0
- data/sidekiq_prometheus.gemspec +3 -2
- metadata +19 -9
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2714333d887725850f63e8fc1caf7d43c81186f8c2a8d7ac8aef03e6c58b18b8
|
4
|
+
data.tar.gz: f7d847ae7d35c0d082fda2b31ed5eb61c54d3f3314ed85c983bc2f05cc7cb68d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a50d4f382cbe52c0ba351b7a6a006c2f2787d14292f8fc4d2d84af0b92b75cea7edded1e55087d56cdbc047b3f43c693745ffa0d8043bd2faee9f9e6c61e4ff8
|
7
|
+
data.tar.gz: 1dd6f7d4052529dcb35055acf4c42739bd56b19a0b44ac0e3c5985b42c45b38e034e5f7113fc01b127675ee3930a3e0202f2ddcfc8db0577575ad7034f98d49d
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "main" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "main" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['2.7', '3.0', '3.1', '3.2']
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v3
|
22
|
+
- name: Set up Ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby-version }}
|
26
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
27
|
+
- name: Run tests
|
28
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
|
3
|
+
<a name="v2.0.0"></a>
|
4
|
+
## [v2.0.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.9.0...v2.0.0) (2023-08-23)
|
5
|
+
|
6
|
+
## What's Changed
|
7
|
+
* Sidekiq 7 support by @leklund in https://github.com/fastly/sidekiq-prometheus/pull/37
|
8
|
+
|
9
|
+
**Full Changelog**: https://github.com/fastly/sidekiq-prometheus/compare/v1.9.0...v2.0.0
|
10
|
+
|
11
|
+
<a name="v1.9.0"></a>
|
12
|
+
## [v1.9.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.8.3...v1.9.0) (2023-08-23)
|
13
|
+
|
14
|
+
## What's Changed
|
15
|
+
* Adds info about sidekiq_job_over_limit metric to README by @ricardogpsf in https://github.com/fastly/sidekiq-prometheus/pull/38
|
16
|
+
* Allow label sets initialization while registering metrics by @davidbrusius in https://github.com/fastly/sidekiq-prometheus/pull/40
|
17
|
+
|
18
|
+
## New Contributors
|
19
|
+
* @ricardogpsf made their first contribution in https://github.com/fastly/sidekiq-prometheus/pull/38
|
20
|
+
* @davidbrusius made their first contribution in https://github.com/fastly/sidekiq-prometheus/pull/40
|
21
|
+
|
22
|
+
**Full Changelog**: https://github.com/fastly/sidekiq-prometheus/compare/v1.8.3...v1.9.0
|
23
|
+
|
3
24
|
<a name="v1.8.3"></a>
|
4
25
|
## [v1.8.3](https://github.com/fastly/sidekiq-prometheus/compare/v1.8.2...v1.8.3) (2023-01-30)
|
5
26
|
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Sidekiq Prometheus
|
2
2
|
|
3
3
|
|
4
|
-
[![Status](https://
|
4
|
+
[![Status](https://github.com/fastly/sidekiq-prometheus/actions/workflows/ruby.yml/badge.svg)](https://github.com/fastly/sidekiq-prometheus/actions/workflows/ruby.yml)
|
5
5
|
![Gem](https://img.shields.io/gem/v/sidekiq_prometheus.svg?color=blue)
|
6
6
|
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
|
7
7
|
|
@@ -276,7 +276,3 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
276
276
|
## Code of Conduct
|
277
277
|
|
278
278
|
Everyone interacting in the SidekiqPrometheus project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/fastly/sidekiq-prometheus/blob/main/CODE_OF_CONDUCT.md).
|
279
|
-
|
280
|
-
# Metadata
|
281
|
-
|
282
|
-
- Ignore
|
@@ -30,7 +30,7 @@ class SidekiqPrometheus::JobMetrics
|
|
30
30
|
|
31
31
|
result
|
32
32
|
rescue => e
|
33
|
-
if e.instance_of?(::Sidekiq::Limiter::OverLimit)
|
33
|
+
if defined?(::Sidekiq::Limiter::OverLimit) && e.instance_of?(::Sidekiq::Limiter::OverLimit)
|
34
34
|
registry[:sidekiq_job_over_limit].increment(labels: labels)
|
35
35
|
else
|
36
36
|
err_label = {error_class: e.class.to_s}
|
@@ -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
|
-
|
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
|
data/lib/sidekiq_prometheus.rb
CHANGED
data/sidekiq_6.gemfile
ADDED
data/sidekiq_7.gemfile
ADDED
data/sidekiq_prometheus.gemspec
CHANGED
@@ -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 "
|
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:
|
4
|
+
version: 2.0.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: 2023-
|
12
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -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
|
@@ -152,9 +160,9 @@ extra_rdoc_files: []
|
|
152
160
|
files:
|
153
161
|
- ".chglog/CHANGELOG.tpl.md"
|
154
162
|
- ".chglog/config.yml"
|
163
|
+
- ".github/workflows/ruby.yml"
|
155
164
|
- ".gitignore"
|
156
165
|
- ".rubocop.yml"
|
157
|
-
- ".travis.yml"
|
158
166
|
- CHANGELOG.md
|
159
167
|
- CODE_OF_CONDUCT.md
|
160
168
|
- Gemfile
|
@@ -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:
|