diff options
Diffstat (limited to 'lib/gitlab/redis/wrapper.rb')
-rw-r--r-- | lib/gitlab/redis/wrapper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |