diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-01 13:54:39 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-01 13:54:39 +0100 |
commit | 1256dabb445211fe48f1d53cc5be15ad99793178 (patch) | |
tree | c9dd837674142e08ad16c3a4690a4dece6a2d82b /config | |
parent | 48eb2cd664913b437f8d72521b3752f03467b450 (diff) | |
download | gitlab-ce-1256dabb445211fe48f1d53cc5be15ad99793178.tar.gz |
Instrument all Gitlab::Git instance methods
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/metrics.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb index 0945b93ed5d..e69552631ff 100644 --- a/config/initializers/metrics.rb +++ b/config/initializers/metrics.rb @@ -49,12 +49,14 @@ if Gitlab::Metrics.enabled? config.instrument_instance_methods(Gitlab::Shell) config.instrument_methods(Gitlab::Git) - config.instrument_instance_methods(Gitlab::Git::Repository) Gitlab::Git.constants.each do |name| const = Gitlab::Git.const_get(name) - config.instrument_methods(const) if const.is_a?(Module) + next unless const.is_a?(Module) + + config.instrument_methods(const) + config.instrument_instance_methods(const) end Dir[Rails.root.join('app', 'finders', '*.rb')].each do |path| |