sidekiq_prometheus 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -1
- data/README.md +1 -1
- data/lib/sidekiq_prometheus/job_metrics.rb +7 -2
- data/lib/sidekiq_prometheus/metrics.rb +7 -0
- data/lib/sidekiq_prometheus/periodic_metrics.rb +1 -1
- data/lib/sidekiq_prometheus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 564b12c7284161a3350d677f809da15ca5d70b0b2a9eb5303970639cb85aeedb
|
4
|
+
data.tar.gz: 99c3995589218b36b0016d7585bedf17a4ac783fdfa4efb306b5bffbd8c6e766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 261e2cc263e08cf1d5784c63a2af38855db615f995f5d66f5b8c8c837e80fe22c0a5f2c6a85671c7bc1c4144a5b5ca816916088a77281ffd5e099ebf1da07a23
|
7
|
+
data.tar.gz: 6bccef33e7d74236fdad77eb93072f02804e838c5dc6760b26e7ed624667b1a73d0ebce1170469ce60345d2fed43bb1c2fab615e202c6fe4a76388b11d8e6054
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
|
3
|
+
<a name="v1.7.0"></a>
|
4
|
+
## [v1.7.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.6.0...v1.7.0) (2022-09-29)
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* s/metrics_server_logging_enabled/metrics_server_logger_enabled/
|
9
|
+
|
10
|
+
### Features
|
11
|
+
|
12
|
+
* add Sidekiq::Stats processes_size to the periodic metrics
|
13
|
+
|
14
|
+
### Pull Requests
|
15
|
+
|
16
|
+
* Merge pull request [#30](https://github.com/fastly/sidekiq-prometheus/issues/30) from fastly/add_processes_size
|
17
|
+
|
18
|
+
|
19
|
+
<a name="v1.6.0"></a>
|
20
|
+
## [v1.6.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.5.0...v1.6.0) (2021-08-03)
|
21
|
+
|
22
|
+
### Features
|
23
|
+
|
24
|
+
* add option for silencing the WEBrick access logging of /metrics
|
25
|
+
|
26
|
+
### Pull Requests
|
27
|
+
|
28
|
+
* Merge pull request [#25](https://github.com/fastly/sidekiq-prometheus/issues/25) from fastly/option_for_silencing_webrick
|
29
|
+
|
3
30
|
|
4
31
|
<a name="v1.5.0"></a>
|
5
32
|
## [v1.5.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.4.0...v1.5.0) (2021-08-02)
|
@@ -35,8 +62,9 @@ CHANGELOG
|
|
35
62
|
|
36
63
|
### Pull Requests
|
37
64
|
|
38
|
-
* Merge pull request [#
|
65
|
+
* Merge pull request [#18](https://github.com/fastly/sidekiq-prometheus/issues/18) from jetpks/release-120
|
39
66
|
* Merge pull request [#15](https://github.com/fastly/sidekiq-prometheus/issues/15) from silicakes/master
|
67
|
+
* Merge pull request [#17](https://github.com/fastly/sidekiq-prometheus/issues/17) from jetpks/add-option-to-disable-metrics-server
|
40
68
|
|
41
69
|
<a name="v1.1.0"></a>
|
42
70
|
## [v1.1.0](https://github.com/fastly/sidekiq-prometheus/compare/v1.0.1...v1.1.0) (2020-02-12)
|
@@ -52,6 +80,14 @@ CHANGELOG
|
|
52
80
|
* Merge pull request [#11](https://github.com/fastly/sidekiq-prometheus/issues/11) from rossjones/patch-1
|
53
81
|
* Merge pull request [#12](https://github.com/fastly/sidekiq-prometheus/issues/12) from fastly/hr
|
54
82
|
|
83
|
+
<a name="v1.0.1"></a>
|
84
|
+
## [v1.0.1](https://github.com/fastly/sidekiq-prometheus/compare/v0.9.2...v1.0.1) (2019-10-30)
|
85
|
+
|
86
|
+
### Pull Requests
|
87
|
+
|
88
|
+
* Merge pull request [#9](https://github.com/fastly/sidekiq-prometheus/issues/9) from we4tech/features/update-prometheus-client
|
89
|
+
|
90
|
+
|
55
91
|
<a name="v1.0.0"></a>
|
56
92
|
## [v1.0.0](https://github.com/fastly/sidekiq-prometheus/compare/v0.9.1...v1.0.0) (2019-10-24)
|
57
93
|
|
@@ -60,6 +96,10 @@ CHANGELOG
|
|
60
96
|
* Merge pull request [#9](https://github.com/fastly/sidekiq-prometheus/issues/9) from we4tech/features/update-prometheus-client
|
61
97
|
|
62
98
|
|
99
|
+
<a name="v0.9.2"></a>
|
100
|
+
## [v0.9.2](https://github.com/fastly/sidekiq-prometheus/compare/v1.0.0...v0.9.2) (2019-10-30)
|
101
|
+
|
102
|
+
|
63
103
|
<a name="v0.9.1"></a>
|
64
104
|
## [v0.9.1](https://github.com/fastly/sidekiq-prometheus/compare/v0.9.0...v0.9.1) (2019-07-08)
|
65
105
|
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ end
|
|
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`.
|
83
83
|
* `periodic_reporting_interval`: interval in seconds for reporting periodic metrics. Default: `30`
|
84
84
|
* `metrics_server_enabled`: Boolean that determines whether to run the rack server. Defaults to `true`
|
85
|
-
* `
|
85
|
+
* `metrics_server_logger_enabled`: Boolean that determines if the metrics server will log access logs. Defaults to `true`
|
86
86
|
* `metrics_host`: Host on which the rack server will listen. Defaults to
|
87
87
|
`localhost`
|
88
88
|
* `metrics_port`: Port on which the rack server will listen. Defaults to `9359`
|
@@ -30,8 +30,13 @@ class SidekiqPrometheus::JobMetrics
|
|
30
30
|
|
31
31
|
result
|
32
32
|
rescue StandardError => e
|
33
|
-
|
34
|
-
|
33
|
+
if e.class.to_s == 'Sidekiq::Limiter::OverLimit'
|
34
|
+
registry[:sidekiq_job_over_limit].increment(labels: labels)
|
35
|
+
else
|
36
|
+
err_label = { :error_class => e.class.to_s }
|
37
|
+
registry[:sidekiq_job_failed].increment(labels: err_label.merge(labels))
|
38
|
+
end
|
39
|
+
|
35
40
|
raise e
|
36
41
|
ensure
|
37
42
|
registry[:sidekiq_job_count].increment(labels: labels)
|
@@ -11,6 +11,9 @@ module SidekiqPrometheus::Metrics
|
|
11
11
|
{ name: :sidekiq_workers_size,
|
12
12
|
type: :gauge,
|
13
13
|
docstring: 'Total number of workers processing jobs', },
|
14
|
+
{ name: :sidekiq_processes_size,
|
15
|
+
type: :gauge,
|
16
|
+
docstring: 'Total number of running sidekiq processes', },
|
14
17
|
{ name: :sidekiq_dead_size,
|
15
18
|
type: :gauge,
|
16
19
|
docstring: 'Total Dead Size', },
|
@@ -69,6 +72,10 @@ module SidekiqPrometheus::Metrics
|
|
69
72
|
type: :counter,
|
70
73
|
docstring: 'Count of successful Sidekiq jobs',
|
71
74
|
labels: JOB_LABELS, },
|
75
|
+
{ name: :sidekiq_job_over_limit,
|
76
|
+
type: :counter,
|
77
|
+
docstring: 'Count of over limit Sidekiq jobs',
|
78
|
+
labels: JOB_LABELS, },
|
72
79
|
].freeze
|
73
80
|
SIDEKIQ_GC_METRIC = {
|
74
81
|
name: :sidekiq_job_allocated_objects,
|
@@ -18,7 +18,7 @@ class SidekiqPrometheus::PeriodicMetrics
|
|
18
18
|
attr_reader :interval
|
19
19
|
attr_reader :senate, :sidekiq_stats, :sidekiq_queue
|
20
20
|
|
21
|
-
GLOBAL_STATS = %i[failed processed retry_size dead_size scheduled_size workers_size].freeze
|
21
|
+
GLOBAL_STATS = %i[failed processed retry_size dead_size scheduled_size workers_size processes_size].freeze
|
22
22
|
GC_STATS = {
|
23
23
|
counters: %i[major_gc_count minor_gc_count total_allocated_objects],
|
24
24
|
gauges: %i[heap_live_slots heap_free_slots],
|
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.
|
4
|
+
version: 1.8.0
|
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:
|
12
|
+
date: 2022-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|