Class: Skylight::Probes::Redis::Probe Private
- Defined in:
- lib/skylight/probes/redis.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #install ⇒ Object private
Instance Method Details
#install ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/skylight/probes/redis.rb', line 46 def install version = defined?(::Redis::VERSION) ? Gem::Version.new(::Redis::VERSION) : nil if !version || version < Gem::Version.new("3.0.0") Skylight.error "The installed version of Redis doesn't support Middlewares. " \ "At least version 3.0.0 is required." return end if ::Redis::Client.method_defined?(:call_v) ::Redis::Client.prepend(ClientInstrumentationV5) else ::Redis::Client.prepend(ClientInstrumentation) end ::Redis.prepend(Instrumentation) end |