mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Update sidekiq configuration to include Prometheus instrumentation
This commit is contained in:
parent
d0e0158ef9
commit
55a575f87a
1 changed files with 15 additions and 3 deletions
|
|
@ -3,10 +3,22 @@
|
|||
Sidekiq.configure_server do |config|
|
||||
config.redis = { url: ENV['REDIS_URL'] }
|
||||
|
||||
config.server_middleware do |chain|
|
||||
if ENV.fetch('PROMETHEUS_EXPORTER_ENABLED', false)
|
||||
require 'prometheus_exporter/instrumentation'
|
||||
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.on :startup do
|
||||
PrometheusExporter::Instrumentation::Process.start type: 'sidekiq'
|
||||
PrometheusExporter::Instrumentation::SidekiqProcess.start
|
||||
PrometheusExporter::Instrumentation::SidekiqQueue.start
|
||||
PrometheusExporter::Instrumentation::SidekiqStats.start
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
|
|
|
|||
Loading…
Reference in a new issue