demarches-normaliennes/config/initializers/prometheus_metrics.rb
2024-04-22 09:35:35 +02:00

3 lines
211 B
Ruby

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