-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add setting to force enable or disable collection of Sidekiq cluster-…
…wide metrics (#20) Use anyway_config for configuration. Setting `collect_cluster_metrics` is on by default in Sidekiq worker processes and off everywhere else, but can be force enabled or disabled if default behavior poses excess load to Redis and/or monitoring system. Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com> Co-authored-by: Andrey Novikov <envek@envek.name>
- Loading branch information
Showing
5 changed files
with
91 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
require "anyway" | ||
|
||
module Yabeda | ||
module Sidekiq | ||
class Config < ::Anyway::Config | ||
config_name :yabeda_sidekiq | ||
|
||
# By default all sidekiq worker processes (servers) collects global metrics about whole Sidekiq installation. | ||
# Client processes (everything else that is not Sidekiq worker) by default doesn't. | ||
# With this config you can override this behavior: | ||
# - force disable if you don't want multiple Sidekiq workers to report the same numbers (that causes excess load to both Redis and monitoring) | ||
# - force enable if you want non-Sidekiq process to collect them (like dedicated metric exporter process) | ||
attr_config collect_cluster_metrics: ::Sidekiq.server? | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters