class Opbeat::Injections::Redis::Injector

Public Instance Methods

call(command, &block) click to toggle source
# File lib/opbeat/injections/redis.rb, line 9
def call(command, &block)
  signature = command[0]

  Opbeat.trace signature.to_s, 'cache.redis'.freeze do
    call_without_opbeat(command, &block)
  end
end
install() click to toggle source
# File lib/opbeat/injections/redis.rb, line 5
def install
  ::Redis::Client.class_eval do
    alias call_without_opbeat call

    def call(command, &block)
      signature = command[0]

      Opbeat.trace signature.to_s, 'cache.redis'.freeze do
        call_without_opbeat(command, &block)
      end
    end
  end
end