summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 09:06:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 09:06:11 +0000
commite567b4c2df7dc4085d213db029eff6b6fcde0152 (patch)
tree801718b86d32bdd82a3cd90760e06a4d7a51b71d /config
parent42b933efc3384386c1991daca1a6d58160f70176 (diff)
downloadgitlab-ce-e567b4c2df7dc4085d213db029eff6b6fcde0152.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/initializers/7_prometheus_metrics.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index 143b34b5368..6bd2256ac0e 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -47,10 +47,12 @@ if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled?
end
Gitlab::Cluster::LifecycleEvents.on_master_start do
+ ::Prometheus::Client.reinitialize_on_pid_change(force: true)
+
if defined?(::Unicorn)
- Gitlab::Metrics::Samplers::UnicornSampler.initialize_instance(Settings.monitoring.unicorn_sampler_interval).start
+ Gitlab::Metrics::Samplers::UnicornSampler.instance(Settings.monitoring.unicorn_sampler_interval).start
elsif defined?(::Puma)
- Gitlab::Metrics::Samplers::PumaSampler.initialize_instance(Settings.monitoring.puma_sampler_interval).start
+ Gitlab::Metrics::Samplers::PumaSampler.instance(Settings.monitoring.puma_sampler_interval).start
end
end
end