2017-07-19 04:54:39 -04:00
|
|
|
require 'prometheus/client'
|
|
|
|
|
|
|
|
Prometheus::Client.configure do |config|
|
|
|
|
config.logger = Rails.logger
|
|
|
|
|
|
|
|
config.initial_mmap_file_size = 4 * 1024
|
|
|
|
config.multiprocess_files_dir = ENV['prometheus_multiproc_dir']
|
|
|
|
|
2017-07-25 08:19:09 -04:00
|
|
|
if Rails.env.development? || Rails.env.test?
|
2017-07-19 04:54:39 -04:00
|
|
|
config.multiprocess_files_dir ||= Rails.root.join('tmp/prometheus_multiproc_dir')
|
|
|
|
end
|
|
|
|
end
|