summaryrefslogtreecommitdiff
path: root/config/initializers/7_prometheus_metrics.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/7_prometheus_metrics.rb')
-rw-r--r--config/initializers/7_prometheus_metrics.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index d40049970c1..c14ee1458bc 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -32,15 +32,8 @@ end
Sidekiq.configure_server do |config|
config.on(:startup) do
- # webserver metrics are cleaned up in config.ru: `warmup` block
- Prometheus::CleanupMultiprocDirService.new.execute
- # In production, sidekiq is run in a multi-process setup where processes might interfere
- # with each other cleaning up and reinitializing prometheus database files, which is why
- # we're re-doing the work every time here.
- # A cleaner solution would be to run the cleanup pre-fork, and the initialization once
- # after all workers have forked, but I don't know how at this point.
- ::Prometheus::Client.reinitialize_on_pid_change(force: true)
-
+ # Do not clean the metrics directory here - the supervisor script should
+ # have already taken care of that
Gitlab::Metrics::Exporter::SidekiqExporter.instance.start
end
end