diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-08-10 17:18:37 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-11-02 20:09:21 +0300 |
commit | 03b38a4a8dd5ba01043264df31b7f5faf6217e1b (patch) | |
tree | 80c64ebb268bacb1f53247bf9d97b8a4c36208bd /config | |
parent | 52115b905a72030afd536922389ed42991aec4cb (diff) |
Add GC sampler and small refactor of samplers
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/7_prometheus_metrics.rb | 4 | ||||
-rw-r--r-- | config/initializers/8_metrics.rb | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index 31839297523..f2d2fa46357 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -19,3 +19,7 @@ Sidekiq.configure_server do |config| Gitlab::Metrics::SidekiqMetricsExporter.instance.start end end + +# if Gitlab::Metrics.prometheus_metrics_enabled? +Gitlab::Metrics::Samplers::RubySampler.initialize_instance(1.second).start +# end diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb index 2d8704622b6..e1ca67b3b78 100644 --- a/config/initializers/8_metrics.rb +++ b/config/initializers/8_metrics.rb @@ -123,8 +123,8 @@ def instrument_classes(instrumentation) end # rubocop:enable Metrics/AbcSize -unless Sidekiq.server? - Gitlab::Metrics::UnicornSampler.initialize_instance(Settings.monitoring.unicorn_sampler_interval).start +unless Sidekiq.server? + Gitlab::Metrics::Samplers::UnicornSampler.initialize_instance(Settings.monitoring.unicorn_sampler_interval).start end Gitlab::Application.configure do |config| @@ -192,7 +192,7 @@ if Gitlab::Metrics.enabled? GC::Profiler.enable - Gitlab::Metrics::InfluxSampler.initialize_instance.start + Gitlab::Metrics::Samplers::InfluxSampler.initialize_instance.start module TrackNewRedisConnections def connect(*args) |