From a5b8d4bceaeef1ea49695e3bf25b2037f705d252 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Fri, 14 Jul 2017 10:19:20 +0100 Subject: Instrument Ability --- config/initializers/8_metrics.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config/initializers/8_metrics.rb') diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb index 5e34aac6527..c80d28746d6 100644 --- a/config/initializers/8_metrics.rb +++ b/config/initializers/8_metrics.rb @@ -174,6 +174,10 @@ if Gitlab::Metrics.enabled? loc && loc[0].start_with?(models) && method.source =~ regex end end + + # Ability is in app/models, is not an ActiveRecord model, but should still + # be instrumented. + Gitlab::Metrics::Instrumentation.instrument_methods(Ability) end Gitlab::Metrics::Instrumentation.configure do |config| -- cgit v1.2.1