diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-15 23:41:47 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-19 18:52:23 +0200 |
commit | ed5c7d11b19c9507206ada5c6e12eef477370fa9 (patch) | |
tree | bfcc3cf34e741d558645821e486ecabc73c507e2 /config/boot.rb | |
parent | a4a5cbf29a983d05b5fc69f8e63fc37e100c8637 (diff) | |
download | gitlab-ce-ed5c7d11b19c9507206ada5c6e12eef477370fa9.tar.gz |
Do not enable prometheus metrics when data folder is not present.
+ Set defaults correctly only for when not in production or staging
+ set ENV['prometheus_multiproc_dir'] in config/boot.rb instead of config.ru
Test prometheus metrics unmemoized
Diffstat (limited to 'config/boot.rb')
-rw-r--r-- | config/boot.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/boot.rb b/config/boot.rb index db5ab918021..16de55d7a86 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -6,7 +6,9 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) # set default directory for multiproces metrics gathering -ENV['prometheus_multiproc_dir'] ||= 'tmp/prometheus_multiproc_dir' +if ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test' + ENV['prometheus_multiproc_dir'] ||= 'tmp/prometheus_multiproc_dir' +end # Default Bootsnap configuration from https://github.com/Shopify/bootsnap#usage require 'bootsnap' |