diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index fdbca0dd..d7e28c3b 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -3,21 +3,19 @@ Sidekiq.configure_server do |config| config.redis = { url: ENV['REDIS_URL'] } - if ENV.fetch('PROMETHEUS_EXPORTER_ENABLED', false) - require 'prometheus_exporter/instrumentation' + require 'prometheus_exporter/instrumentation' - config.server_middleware do |chain| - chain.add PrometheusExporter::Instrumentation::Sidekiq - end + config.server_middleware do |chain| + chain.add PrometheusExporter::Instrumentation::Sidekiq + end - config.death_handlers << PrometheusExporter::Instrumentation::Sidekiq.death_handler + config.death_handlers << PrometheusExporter::Instrumentation::Sidekiq.death_handler - config.on :startup do - PrometheusExporter::Instrumentation::Process.start type: 'sidekiq' - PrometheusExporter::Instrumentation::SidekiqProcess.start - PrometheusExporter::Instrumentation::SidekiqQueue.start - PrometheusExporter::Instrumentation::SidekiqStats.start - end + config.on :startup do + PrometheusExporter::Instrumentation::Process.start type: 'sidekiq' + PrometheusExporter::Instrumentation::SidekiqProcess.start + PrometheusExporter::Instrumentation::SidekiqQueue.start + PrometheusExporter::Instrumentation::SidekiqStats.start end end diff --git a/docker-compose.yml b/docker-compose.yml index 947b6e89..d5df6b27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,6 +45,7 @@ services: - dawarich ports: - 3000:3000 + # - 9394:9394 # Prometheus exporter, uncomment if needed stdin_open: true tty: true entrypoint: dev-entrypoint.sh @@ -65,8 +66,8 @@ services: DISTANCE_UNIT: km PHOTON_API_HOST: photon.komoot.io PHOTON_API_USE_HTTPS: true - PROMETHEUS_EXPORTER_ENABLED: false - PROMETHEUS_EXPORTER_HOST: "0.0.0.0" + PROMETHEUS_EXPORTER_ENABLED: true + PROMETHEUS_EXPORTER_HOST: 0.0.0.0 PROMETHEUS_EXPORTER_PORT: 9394 logging: driver: "json-file"