summaryrefslogtreecommitdiff
path: root/config/initializers/7_prometheus_metrics.rb
blob: a2f8421f5d7743c8b706462d73ec5c8d4dc6512f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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']

  if Rails.env.development? || Rails.env.test?
    config.multiprocess_files_dir ||= Rails.root.join('tmp/prometheus_multiproc_dir')
  end
end