summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-03-13 18:25:25 +0000
committerDouwe Maan <douwe@gitlab.com>2017-03-13 18:25:25 +0000
commitcc4ca1f3fe2e2f7470c4fae9a9c5676bbebb18b6 (patch)
treed146fcb55dd01f9579ae1120c69056c36c3a36af /config
parent06c3c71bb8b15e4cad43cf890012ac869248b861 (diff)
parentb55936bf0beb2b21de793e3dfc350a6ca1445db1 (diff)
downloadgitlab-ce-cc4ca1f3fe2e2f7470c4fae9a9c5676bbebb18b6.tar.gz
Merge branch '25515-delegate-single-discussion-to-new-issue' into 'master'
Create a new issue for a single discussion See merge request !8266
Diffstat (limited to 'config')
-rw-r--r--config/application.rb3
-rw-r--r--config/initializers/8_metrics.rb18
2 files changed, 13 insertions, 8 deletions
diff --git a/config/application.rb b/config/application.rb
index 1cc092c4da1..98b2759a8a7 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -26,7 +26,8 @@ module Gitlab
#{config.root}/app/models/hooks
#{config.root}/app/models/members
#{config.root}/app/models/project_services
- #{config.root}/app/workers/concerns))
+ #{config.root}/app/workers/concerns
+ #{config.root}/app/services/concerns))
config.generators.templates.push("#{config.root}/generator_templates")
diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb
index a1517e6afc8..3e1657b8382 100644
--- a/config/initializers/8_metrics.rb
+++ b/config/initializers/8_metrics.rb
@@ -20,13 +20,17 @@ def instrument_classes(instrumentation)
# Path to search => prefix to strip from constant
paths_to_instrument = {
- %w(app finders) => %w(app finders),
- %w(app mailers emails) => %w(app mailers),
- %w(app services **) => %w(app services),
- %w(lib gitlab conflicts) => ['lib'],
- %w(lib gitlab diff) => ['lib'],
- %w(lib gitlab email message) => ['lib'],
- %w(lib gitlab checks) => ['lib']
+ %w(app finders) => %w(app finders),
+ %w(app mailers emails) => %w(app mailers),
+ # Don't instrument `app/services/concerns`
+ # It contains modules that are included in the services.
+ # The services themselves are instrumented so the methods from the modules
+ # are included.
+ %w(app services [^concerns]**) => %w(app services),
+ %w(lib gitlab conflicts) => ['lib'],
+ %w(lib gitlab diff) => ['lib'],
+ %w(lib gitlab email message) => ['lib'],
+ %w(lib gitlab checks) => ['lib']
}
paths_to_instrument.each do |(path, prefix)|