diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-11-23 00:26:50 +0100 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-11-23 23:32:55 +0100 |
commit | cdcbeaccbec09fefe81b7b90badacf5308751ce9 (patch) | |
tree | 25c866a1052c9b0f7bd606618fd401359e82bed3 /config/initializers | |
parent | de2400f6404476e82d95f7cc6cd1fc26779c147b (diff) | |
download | gitlab-ce-cdcbeaccbec09fefe81b7b90badacf5308751ce9.tar.gz |
Move prometheus middle ware to prometheus initialized.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/7_prometheus_metrics.rb | 6 | ||||
-rw-r--r-- | config/initializers/8_metrics.rb | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index e8f33593fe0..a9138db585f 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -13,7 +13,6 @@ Prometheus::Client.configure do |config| config.pid_provider = -> do wid = Prometheus::Client::Support::Unicorn.worker_id - wid = Process.pid if wid.nil? if wid.nil? "process_pid_#{Process.pid}" else @@ -22,6 +21,11 @@ Prometheus::Client.configure do |config| end end +Gitlab::Application.configure do |config| + # 0 should be Sentry to catch errors in this middleware + config.middleware.insert(1, Gitlab::Metrics::RequestsRackMiddleware) +end + Sidekiq.configure_server do |config| config.on(:startup) do Gitlab::Metrics::SidekiqMetricsExporter.instance.start diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb index 7ef594836d6..45b39b2a38d 100644 --- a/config/initializers/8_metrics.rb +++ b/config/initializers/8_metrics.rb @@ -118,11 +118,6 @@ def instrument_classes(instrumentation) end # rubocop:enable Metrics/AbcSize -Gitlab::Application.configure do |config| - # 0 should be Sentry to catch errors in this middleware - config.middleware.insert(1, Gitlab::Metrics::RequestsRackMiddleware) -end - if Gitlab::Metrics.enabled? require 'pathname' require 'influxdb' |