diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-28 01:40:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-28 01:40:43 +0300 |
commit | bbe511b231b5de3fab4dc418601c89cc1ccc8063 (patch) | |
tree | 650453c3b64751df39fda6f33ca4b39318f41e0d /config.ru | |
parent | ad1c34c03de42ebc5279f338f6304e77930d34d4 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-ee
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 ed76239ef2e..ebe719d4b0f 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 |