summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Cobb <rcobb@gitlab.com>2019-06-13 19:41:29 -0600
committerRyan Cobb <rcobb@gitlab.com>2019-06-13 19:41:29 -0600
commit5c297aa8535e48975f82eac21bcdad9d3b255fda (patch)
tree2338ad7ed4acd328933485d17481dc101122a433
parent6de8cb7e9cf715e720fab9e7359ddb63c992af3b (diff)
downloadgitlab-ce-rc/add_back_sidekiq_exporter.tar.gz
Add back sidekiq metrics exporterrc/add_back_sidekiq_exporter
-rw-r--r--config/initializers/7_prometheus_metrics.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index 4da683014d4..68f8487d377 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -19,6 +19,12 @@ 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