diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /lib/gitlab/redis | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'lib/gitlab/redis')
-rw-r--r-- | lib/gitlab/redis/cache.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/redis/queues.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/redis/shared_state.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/redis/wrapper.rb | 6 |
4 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitlab/redis/cache.rb b/lib/gitlab/redis/cache.rb index 6e31c506438..a634f12345a 100644 --- a/lib/gitlab/redis/cache.rb +++ b/lib/gitlab/redis/cache.rb @@ -27,6 +27,10 @@ module Gitlab # this will force use of DEFAULT_REDIS_QUEUES_URL when config file is absent super end + + def instrumentation_class + ::Gitlab::Instrumentation::Redis::Cache + end end end end diff --git a/lib/gitlab/redis/queues.rb b/lib/gitlab/redis/queues.rb index 0375e4a221a..42d5167beb3 100644 --- a/lib/gitlab/redis/queues.rb +++ b/lib/gitlab/redis/queues.rb @@ -28,6 +28,10 @@ module Gitlab # this will force use of DEFAULT_REDIS_QUEUES_URL when config file is absent super end + + def instrumentation_class + ::Gitlab::Instrumentation::Redis::Queues + end end end end diff --git a/lib/gitlab/redis/shared_state.rb b/lib/gitlab/redis/shared_state.rb index 35356083f26..8ab53700932 100644 --- a/lib/gitlab/redis/shared_state.rb +++ b/lib/gitlab/redis/shared_state.rb @@ -30,6 +30,10 @@ module Gitlab # this will force use of DEFAULT_REDIS_SHARED_STATE_URL when config file is absent super end + + def instrumentation_class + ::Gitlab::Instrumentation::Redis::SharedState + end end end end diff --git a/lib/gitlab/redis/wrapper.rb b/lib/gitlab/redis/wrapper.rb index 06ee81ba172..5584323789b 100644 --- a/lib/gitlab/redis/wrapper.rb +++ b/lib/gitlab/redis/wrapper.rb @@ -71,6 +71,10 @@ module Gitlab # nil will force use of DEFAULT_REDIS_URL when config file is absent nil end + + def instrumentation_class + raise NotImplementedError + end end def initialize(rails_env = nil) @@ -100,6 +104,8 @@ module Gitlab redis_url = config.delete(:url) redis_uri = URI.parse(redis_url) + config[:instrumentation_class] ||= self.class.instrumentation_class + if redis_uri.scheme == 'unix' # Redis::Store does not handle Unix sockets well, so let's do it for them config[:path] = redis_uri.path |