yabeda-sidekiq 0.8.2 → 0.9.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: '08af80462b44bb1631a4e7103354bf2cd3613807b629d282d31913ec8c2dfc75'
4
- data.tar.gz: 60634a95cc22cbeaff73e0986651956e5348315cb42077f4c6a86447dfd45acc
3
+ metadata.gz: f287f1d10d316b33e5d56ea36a9d8dbcc9b1f520b0d3d21d72f11dd5bc40e90f
4
+ data.tar.gz: a3809269e4d6011f7dab4ce89391fd2d14fc0775c1dac768a8105f1949a0205b
5
5
  SHA512:
6
- metadata.gz: 6f880ce4e139f01b07d375e62e252fa990d198e09838aa9d2a3b3d348984adda38debe8ddb33ccc8dd514a2f502f89c27f5acdfafe320479d59a397ac7e56000
7
- data.tar.gz: 29c28c92077f5b3edbd1e844c6ddcba0bb4de99ca164dcfadca30a1c2369979a2cc3ac51192ee700b8d71fc82d68372fc4b12cf00521ae0ef822b5c08d2b9cb0
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Sidekiq
5
- VERSION = "0.8.2"
5
+ VERSION = "0.9.0"
6
6
  end
7
7
  end
@@ -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 ::Sidekiq.server?
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.8.2
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-14 00:00:00.000000000 Z
11
+ date: 2022-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config