diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 18:10:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 18:10:07 +0300 |
commit | b21276806d34b8cc0ec7ac7854ec62f70d408b3c (patch) | |
tree | 128fb345bb3d656e4ee862355df4ff2f4274317c /config.ru | |
parent | a84766a28a87c0342c6b048f5ea2eab2f3216fcf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config.ru')
-rw-r--r-- | config.ru | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config.ru b/config.ru index e9964ddc96e..c74a49cd0e2 100644 --- a/config.ru +++ b/config.ru @@ -9,6 +9,12 @@ def master_process? end warmup do |app| + # The following is necessary to ensure stale Prometheus metrics don't accumulate over time. + # It needs to be done as early as here to ensure metrics files aren't deleted. + # After we hit our app in `warmup`, first metrics and corresponding files already being created, + # for example in `lib/gitlab/metrics/requests_rack_middleware.rb`. + Prometheus::CleanupMultiprocDirService.new.execute if master_process? + client = Rack::MockRequest.new(app) client.get('/') end |