Module: TimeBandits::RedisInstrumentation

Defined in:
lib/time_bandits/monkey_patches/redis.rb

Instance Method Summary collapse

Instance Method Details

#call(command, redis_config) ⇒ Object



21
22
23
24
25
# File 'lib/time_bandits/monkey_patches/redis.rb', line 21

def call(command, redis_config)
  ActiveSupport::Notifications.instrument("request.redis", commands: [command]) do
    super
  end
end

#call_pipelined(commands, redis_config) ⇒ Object



27
28
29
30
31
# File 'lib/time_bandits/monkey_patches/redis.rb', line 27

def call_pipelined(commands, redis_config)
  ActiveSupport::Notifications.instrument("request.redis", commands: commands) do
    super
  end
end