diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-08-12 16:43:10 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-08-12 16:43:10 +0200 |
commit | e0fc43ebe2d174c97062e79de36161914dafbb66 (patch) | |
tree | daeaa25a87ef0d4f4381dd99fb9f52e418c9eda7 /config/initializers | |
parent | b2828d4145ac01468a59b821ced29dd248526089 (diff) | |
download | gitlab-ce-e0fc43ebe2d174c97062e79de36161914dafbb66.tar.gz |
Instrument Project.visible_to_user
Because this method is a Rails scope we have to instrument it manually
as regular the instrumentation methods only instrument methods defined
directly on a Class or Module.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/metrics.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb index cc8208db3c1..52522e099e7 100644 --- a/config/initializers/metrics.rb +++ b/config/initializers/metrics.rb @@ -148,6 +148,9 @@ if Gitlab::Metrics.enabled? config.instrument_methods(Gitlab::Highlight) config.instrument_instance_methods(Gitlab::Highlight) + + # This is a Rails scope so we have to instrument it manually. + config.instrument_method(Project, :visible_to_user) end GC::Profiler.enable |