diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-06-05 12:20:40 -0600 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-06-06 13:19:50 -0600 |
commit | 7131ad46c6d2301d9979f2f8ef9cf081264f03a6 (patch) | |
tree | 69712dca33df935c87b559b177313f3fe243d4bb | |
parent | 8cd197a0ddd1398bb84926da11c76dd1abdfa688 (diff) | |
download | gitlab-ce-7131ad46c6d2301d9979f2f8ef9cf081264f03a6.tar.gz |
Adds sidekiq worker label for ruby metrics
-rw-r--r-- | config/initializers/7_prometheus_metrics.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/metrics/samplers/ruby_sampler.rb | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index 68f8487d377..4da683014d4 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -19,12 +19,6 @@ Gitlab::Application.configure do |config| config.middleware.insert(1, Gitlab::Metrics::RequestsRackMiddleware) end -Sidekiq.configure_server do |config| - config.on(:startup) do - Gitlab::Metrics::SidekiqMetricsExporter.instance.start - end -end - if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled? Gitlab::Cluster::LifecycleEvents.on_worker_start do defined?(::Prometheus::Client.reinitialize_on_pid_change) && Prometheus::Client.reinitialize_on_pid_change diff --git a/lib/gitlab/metrics/samplers/ruby_sampler.rb b/lib/gitlab/metrics/samplers/ruby_sampler.rb index 4d9c43f37e7..17eacbd21d8 100644 --- a/lib/gitlab/metrics/samplers/ruby_sampler.rb +++ b/lib/gitlab/metrics/samplers/ruby_sampler.rb @@ -77,10 +77,10 @@ module Gitlab end def worker_label + return { worker: 'sidekiq' } if Sidekiq.server? return {} unless defined?(Unicorn::Worker) worker_no = ::Prometheus::Client::Support::Unicorn.worker_id - if worker_no { worker: worker_no } else |