diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-02 16:47:39 -0400 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-07 12:10:55 -0400 |
commit | d485ec9f1c7bf00a3c87e3e91b6a306f234a5232 (patch) | |
tree | e181ea3499e346fc18c38617e1a75c071b5a3c86 /config | |
parent | 3fd0b364ea54832a861482d609bd25d485d5ac9c (diff) | |
download | gitlab-ce-d485ec9f1c7bf00a3c87e3e91b6a306f234a5232.tar.gz |
Instrument `RepositoryCheck::SingleRepositoryWorker` manually
This worker is called manually by `RepositoryCheck::BatchWorker` meaning it's not tracked automatically by the Sidekiq middleware.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/metrics.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb index 0c788714714..2673093b96a 100644 --- a/config/initializers/metrics.rb +++ b/config/initializers/metrics.rb @@ -121,6 +121,13 @@ if Gitlab::Metrics.enabled? config.instrument_instance_methods(Gitlab::GitAccessWiki) config.instrument_instance_methods(API::Helpers) + + config.instrument_instance_methods(RepositoryCheck::SingleRepositoryWorker) + # Iterate over each non-super private instance method to keep up to date if + # internals change + RepositoryCheck::SingleRepositoryWorker.private_instance_methods(false).each do |method| + config.instrument_instance_method(RepositoryCheck::SingleRepositoryWorker, method) + end end GC::Profiler.enable |