summaryrefslogtreecommitdiff
path: root/config/initializers/7_prometheus_metrics.rb
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-08-29 15:45:19 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-08-29 15:56:13 +0200
commiteb51ec08941df7d1d0593e14df378ee380c5369c (patch)
treed8cfcb5f2d9b146207f6cd4b8738e504b9d5f334 /config/initializers/7_prometheus_metrics.rb
parent0ed5ee33c1ff8dcd6ae5ebc1a5deef4f8b0d6b42 (diff)
downloadgitlab-ce-eb51ec08941df7d1d0593e14df378ee380c5369c.tar.gz
Update Prometheus Client MMAP gem to version that fixes performance degradation caused by workers churnpawel/bump_prometheus_client_mmap_version_to_fix_performance_degradation
Diffstat (limited to 'config/initializers/7_prometheus_metrics.rb')
-rw-r--r--config/initializers/7_prometheus_metrics.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index 54c797e0714..31839297523 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -1,4 +1,5 @@
require 'prometheus/client'
+require 'prometheus/client/support/unicorn'
Prometheus::Client.configure do |config|
config.logger = Rails.logger
@@ -9,6 +10,8 @@ Prometheus::Client.configure do |config|
if Rails.env.development? || Rails.env.test?
config.multiprocess_files_dir ||= Rails.root.join('tmp/prometheus_multiproc_dir')
end
+
+ config.pid_provider = Prometheus::Client::Support::Unicorn.method(:worker_pid_provider)
end
Sidekiq.configure_server do |config|