demarches-normaliennes/config/initializers/prometheus_metrics.rb

4 lines
211 B
Ruby
Raw Normal View History

if ENV['PROMETHEUS_EXPORTER_ENABLED'] == 'enabled' && !Sidekiq.server?
Prometheus::Client.config.data_store = Prometheus::Client::DataStores::DirectFileStore.new(dir: Rails.root.join('tmp', 'prometheus'))
end