Merge branch '55611-always-load-metrics-the-last' into 'master'

Always load the metrics the last

Closes #55611

See merge request gitlab-org/gitlab-ce!23960
This commit is contained in:
Sean McGivern 2018-12-21 07:29:35 +00:00
commit cc5e58a751
3 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,6 @@
# This file was prefixed with zz_ because we want to load it the last!
# See: https://gitlab.com/gitlab-org/gitlab-ce/issues/55611
# Autoload all classes that we want to instrument, and instrument the methods we
# need. This takes the Gitlab::Metrics::Instrumentation module as an argument so
# that we can stub it for testing, as it is only called when metrics are

View file

@ -35,7 +35,7 @@ Using this method is in general preferred over directly calling the various
instrumentation methods.
Method instrumentation should be added in the initializer
`config/initializers/8_metrics.rb`.
`config/initializers/zz_metrics.rb`.
### Examples

View file

@ -16,7 +16,7 @@ describe 'instrument_classes' do
end
it 'can autoload and instrument all files' do
require_relative '../../config/initializers/8_metrics'
require_relative '../../config/initializers/zz_metrics'
expect { instrument_classes(config) }.not_to raise_error
end
end