yabeda-sidekiq 0.8.2 → 0.9.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 +12 -0
- data/lib/yabeda/sidekiq/config.rb +3 -0
- data/lib/yabeda/sidekiq/version.rb +1 -1
- data/lib/yabeda/sidekiq.rb +8 -8
- 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: f287f1d10d316b33e5d56ea36a9d8dbcc9b1f520b0d3d21d72f11dd5bc40e90f
|
4
|
+
data.tar.gz: a3809269e4d6011f7dab4ce89391fd2d14fc0775c1dac768a8105f1949a0205b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cb86100524d1b8457caad978f1fcaaf299f27e27c74f787f8b9059b02682f6c4fd04017ad60f9e2b22c46d7d64d18b18cac935fea2586a38f886bd47a31e40c
|
7
|
+
data.tar.gz: e536ccdca8b3a9e66eb6ebf3e3795e8083aa46295f9587f5d80e23bf3ab7634851719410d28518d843d44a9c68904e7b162258da1f94737892a6f38c5f69b5e3
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## Unreleased
|
9
9
|
|
10
|
+
## 0.9.0 - 2022-09-26
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Configuration setting to declare worker in-process metrics outside workers.
|
15
|
+
|
16
|
+
It can be needed for official Prometheus client in multi-process mode where separate process expose metrics from Sidekiq worker processes.
|
17
|
+
|
18
|
+
- `most_recent` aggregation for all cluster-wide gauges.
|
19
|
+
|
20
|
+
It is also needed for official Prometheus client in multi-process mode to reduce number of time series.
|
21
|
+
|
10
22
|
## 0.8.2 - 2022-09-14
|
11
23
|
|
12
24
|
### Added
|
@@ -13,6 +13,9 @@ module Yabeda
|
|
13
13
|
# - force disable if you don't want multiple Sidekiq workers to report the same numbers (that causes excess load to both Redis and monitoring)
|
14
14
|
# - force enable if you want non-Sidekiq process to collect them (like dedicated metric exporter process)
|
15
15
|
attr_config collect_cluster_metrics: ::Sidekiq.server?
|
16
|
+
|
17
|
+
# Declare metrics that are only tracked inside worker process even outside them
|
18
|
+
attr_config declare_process_metrics: ::Sidekiq.server?
|
16
19
|
end
|
17
20
|
end
|
18
21
|
end
|
data/lib/yabeda/sidekiq.rb
CHANGED
@@ -27,7 +27,7 @@ module Yabeda
|
|
27
27
|
|
28
28
|
counter :jobs_enqueued_total, tags: %i[queue worker], comment: "A counter of the total number of jobs sidekiq enqueued."
|
29
29
|
|
30
|
-
if
|
30
|
+
if config.declare_process_metrics # defaults to +::Sidekiq.server?+
|
31
31
|
counter :jobs_executed_total, tags: %i[queue worker], comment: "A counter of the total number of jobs sidekiq executed."
|
32
32
|
counter :jobs_success_total, tags: %i[queue worker], comment: "A counter of the total number of jobs successfully processed by sidekiq."
|
33
33
|
counter :jobs_failed_total, tags: %i[queue worker], comment: "A counter of the total number of jobs failed in sidekiq."
|
@@ -48,13 +48,13 @@ module Yabeda
|
|
48
48
|
# Metrics not specific for current Sidekiq process, but representing state of the whole Sidekiq installation (queues, processes, etc)
|
49
49
|
# You can opt-out from collecting these by setting YABEDA_SIDEKIQ_COLLECT_CLUSTER_METRICS to falsy value (+no+ or +false+)
|
50
50
|
if config.collect_cluster_metrics # defaults to +::Sidekiq.server?+
|
51
|
-
gauge :jobs_waiting_count, tags: %i[queue], comment: "The number of jobs waiting to process in sidekiq."
|
52
|
-
gauge :active_workers_count, tags: [], comment: "The number of currently running machines with sidekiq workers."
|
53
|
-
gauge :jobs_scheduled_count, tags: [], comment: "The number of jobs scheduled for later execution."
|
54
|
-
gauge :jobs_retry_count, tags: [], comment: "The number of failed jobs waiting to be retried"
|
55
|
-
gauge :jobs_dead_count, tags: [], comment: "The number of jobs exceeded their retry count."
|
56
|
-
gauge :active_processes, tags: [], comment: "The number of active Sidekiq worker processes."
|
57
|
-
gauge :queue_latency, tags: %i[queue], comment: "The queue latency, the difference in seconds since the oldest job in the queue was enqueued"
|
51
|
+
gauge :jobs_waiting_count, tags: %i[queue], aggregation: :most_recent, comment: "The number of jobs waiting to process in sidekiq."
|
52
|
+
gauge :active_workers_count, tags: [], aggregation: :most_recent, comment: "The number of currently running machines with sidekiq workers."
|
53
|
+
gauge :jobs_scheduled_count, tags: [], aggregation: :most_recent, comment: "The number of jobs scheduled for later execution."
|
54
|
+
gauge :jobs_retry_count, tags: [], aggregation: :most_recent, comment: "The number of failed jobs waiting to be retried"
|
55
|
+
gauge :jobs_dead_count, tags: [], aggregation: :most_recent, comment: "The number of jobs exceeded their retry count."
|
56
|
+
gauge :active_processes, tags: [], aggregation: :most_recent, comment: "The number of active Sidekiq worker processes."
|
57
|
+
gauge :queue_latency, tags: %i[queue], aggregation: :most_recent, comment: "The queue latency, the difference in seconds since the oldest job in the queue was enqueued"
|
58
58
|
end
|
59
59
|
|
60
60
|
collect do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yabeda-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Novikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|