diff options
author | Stan Hu <stanhu@gmail.com> | 2017-11-01 18:10:02 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-11-01 18:15:59 +0300 |
commit | 31e3f47280b6c33c7c9b6526ba82e262dd2bfa26 (patch) | |
tree | edcbeb665ed04909fcbdc65eee1bdcd35c69ec23 /config | |
parent | 713052c7255c9c4fc33b74ca5d788644a30018ca (diff) |
Disable Unicorn sampling in Sidekiq since there are no Unicorn sockets to monitor
This reduces some polling overhead and reduces the need to aggregate
empty metrics from the Sidekiq worker.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/8_metrics.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb index e1a59d8c152..2d8704622b6 100644 --- a/config/initializers/8_metrics.rb +++ b/config/initializers/8_metrics.rb @@ -123,7 +123,9 @@ def instrument_classes(instrumentation) end # rubocop:enable Metrics/AbcSize -Gitlab::Metrics::UnicornSampler.initialize_instance(Settings.monitoring.unicorn_sampler_interval).start +unless Sidekiq.server? + Gitlab::Metrics::UnicornSampler.initialize_instance(Settings.monitoring.unicorn_sampler_interval).start +end Gitlab::Application.configure do |config| # 0 should be Sentry to catch errors in this middleware |