diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-05 12:07:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-05 12:07:43 +0000 |
commit | 872319738757edc0483346c75a2407f7019b963f (patch) | |
tree | d5953edec6184dda1f53c5994c3ebcebc9e815a2 /config | |
parent | 8f764d21b0011056e1492d92afe3bd40b847b9f7 (diff) | |
download | gitlab-ce-872319738757edc0483346c75a2407f7019b963f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/elastic_client_setup.rb | 22 | ||||
-rw-r--r-- | config/initializers/zz_metrics.rb | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/config/initializers/elastic_client_setup.rb b/config/initializers/elastic_client_setup.rb index a1abb29838b..f38b606b3a8 100644 --- a/config/initializers/elastic_client_setup.rb +++ b/config/initializers/elastic_client_setup.rb @@ -7,6 +7,17 @@ require 'gitlab/current_settings' Gitlab.ee do require 'elasticsearch/model' + ### Monkey patches + + Elasticsearch::Model::Response::Records.prepend GemExtensions::Elasticsearch::Model::Response::Records + Elasticsearch::Model::Adapter::Multiple::Records.prepend GemExtensions::Elasticsearch::Model::Adapter::Multiple::Records + Elasticsearch::Model::Indexing::InstanceMethods.prepend GemExtensions::Elasticsearch::Model::Indexing::InstanceMethods + Elasticsearch::Model::Adapter::ActiveRecord::Importing.prepend GemExtensions::Elasticsearch::Model::Adapter::ActiveRecord::Importing + Elasticsearch::Model::Client::InstanceMethods.prepend GemExtensions::Elasticsearch::Model::Client + Elasticsearch::Model::Client::ClassMethods.prepend GemExtensions::Elasticsearch::Model::Client + Elasticsearch::Model::ClassMethods.prepend GemExtensions::Elasticsearch::Model::Client + Elasticsearch::Model.singleton_class.prepend GemExtensions::Elasticsearch::Model::Client + ### Modified from elasticsearch-model/lib/elasticsearch/model.rb [ @@ -32,15 +43,4 @@ Gitlab.ee do target.respond_to?(:as_indexed_json) ? target.__send__(:as_indexed_json, options) : super end CODE - - ### Monkey patches - - Elasticsearch::Model::Response::Records.prepend GemExtensions::Elasticsearch::Model::Response::Records - Elasticsearch::Model::Adapter::Multiple::Records.prepend GemExtensions::Elasticsearch::Model::Adapter::Multiple::Records - Elasticsearch::Model::Indexing::InstanceMethods.prepend GemExtensions::Elasticsearch::Model::Indexing::InstanceMethods - Elasticsearch::Model::Adapter::ActiveRecord::Importing.prepend GemExtensions::Elasticsearch::Model::Adapter::ActiveRecord::Importing - Elasticsearch::Model::Client::InstanceMethods.prepend GemExtensions::Elasticsearch::Model::Client - Elasticsearch::Model::Client::ClassMethods.prepend GemExtensions::Elasticsearch::Model::Client - Elasticsearch::Model::ClassMethods.prepend GemExtensions::Elasticsearch::Model::Client - Elasticsearch::Model.singleton_class.prepend GemExtensions::Elasticsearch::Model::Client end diff --git a/config/initializers/zz_metrics.rb b/config/initializers/zz_metrics.rb index bc28780cc77..416611ef46c 100644 --- a/config/initializers/zz_metrics.rb +++ b/config/initializers/zz_metrics.rb @@ -88,8 +88,8 @@ def instrument_classes(instrumentation) instrumentation.instrument_instance_methods(Gitlab::Highlight) Gitlab.ee do - instrumentation.instrument_methods(Elasticsearch::Git::Repository) - instrumentation.instrument_instance_methods(Elasticsearch::Git::Repository) + instrumentation.instrument_instance_methods(Elastic::Latest::GitInstanceProxy) + instrumentation.instrument_instance_methods(Elastic::Latest::GitClassProxy) instrumentation.instrument_instance_methods(Search::GlobalService) instrumentation.instrument_instance_methods(Search::ProjectService) |