Sha256: bf1dcb661b7c3c227549bdfb33d2f70d2afa8d6d73c4c0bf203bd32f1fb59d78
Contents?: true
Size: 582 Bytes
Versions: 12
Compression:
Stored size: 582 Bytes
Contents
# frozen_string_literal: true module ElasticAPM # @api private module Spies # @api private class RedisSpy def install ::Redis::Client.class_eval do alias call_without_apm call def call(command, &block) name = command[0].upcase return call_without_apm(command, &block) if command[0] == :auth ElasticAPM.span(name.to_s, 'db.redis') do call_without_apm(command, &block) end end end end end register 'Redis', 'redis', RedisSpy.new end end
Version data entries
12 entries across 12 versions & 1 rubygems