Closed mrexox closed 3 years ago
Hey! Thanks for the pull request! I like the idea as it can be really useful on large Sidekiq installation.
I just pushed few changes: using anyway_config for configuration (it allows to use not only environment variables, but many other sources) and renaming of setting (however, I'm still not sure about correct naming).
Let's discuss!
I like the name general
or common
, but general
sounds more like typical
. We mean here the metrics that are not specific to any sidekiq runner. What about aggregate
or overall
name for these metrics?
After further thinking I thought that it is enough to use single setting as force switch for general/global/aggregate metrics (it is by default on in Sidekiq processes and off in non-Sidekiq, thanks for the idea!).
If you run Kubernetes and have several pods running sidekiq, these general metrics can be overkill. So it is better to choose one pod that will publish these metrics instead of all pods publishing the same values.
To make it simple, I offer the solution with ENV variable checking. But I am open to discussion about how to make it more accurate.
UPD: Also added the setting to force collecting metrics even if an application is not a Sidekiq runner.