diff options
Diffstat (limited to 'config/initializers/7_prometheus_metrics.rb')
-rw-r--r-- | config/initializers/7_prometheus_metrics.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index cec1a213ed2..d5d8587f1c8 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -16,7 +16,7 @@ def prometheus_default_multiproc_dir end Prometheus::Client.configure do |config| - config.logger = Rails.logger # rubocop:disable Gitlab/RailsLogger + config.logger = Gitlab::AppLogger config.initial_mmap_file_size = 4 * 1024 @@ -46,6 +46,10 @@ if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled? Gitlab::Metrics::Samplers::DatabaseSampler.initialize_instance.start Gitlab::Metrics::Samplers::ThreadsSampler.initialize_instance.start + if Gitlab::Runtime.action_cable? + Gitlab::Metrics::Samplers::ActionCableSampler.instance.start + end + if Gitlab.ee? && Gitlab::Runtime.sidekiq? Gitlab::Metrics::Samplers::GlobalSearchSampler.instance.start end |