Sha256: 725b4a13051a09e8383af30b6ca8bc607a2493f26752ded621bc63dab942a9bd

Contents?: true

Size: 528 Bytes

Versions: 110

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

module Appsignal
  class Hooks
    # @api private
    class RedisHook < Appsignal::Hooks::Hook
      register :redis

      def dependencies_present?
        defined?(::Redis) &&
          Appsignal.config &&
          Appsignal.config[:instrument_redis]
      end

      def install
        require "appsignal/integrations/redis"
        ::Redis::Client.send(:prepend, Appsignal::Integrations::RedisIntegration)

        Appsignal::Environment.report_enabled("redis")
      end
    end
  end
end

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
appsignal-3.3.11-java lib/appsignal/hooks/redis.rb
appsignal-3.3.11 lib/appsignal/hooks/redis.rb
appsignal-3.4.0-java lib/appsignal/hooks/redis.rb
appsignal-3.4.0 lib/appsignal/hooks/redis.rb
appsignal-3.3.10-java lib/appsignal/hooks/redis.rb
appsignal-3.3.10 lib/appsignal/hooks/redis.rb
appsignal-3.3.9-java lib/appsignal/hooks/redis.rb
appsignal-3.3.9 lib/appsignal/hooks/redis.rb
appsignal-3.3.8-java lib/appsignal/hooks/redis.rb
appsignal-3.3.8 lib/appsignal/hooks/redis.rb
appsignal-3.3.7-java lib/appsignal/hooks/redis.rb
appsignal-3.3.7 lib/appsignal/hooks/redis.rb
appsignal-3.3.6-java lib/appsignal/hooks/redis.rb
appsignal-3.3.6 lib/appsignal/hooks/redis.rb
appsignal-3.3.5-java lib/appsignal/hooks/redis.rb
appsignal-3.3.5 lib/appsignal/hooks/redis.rb
appsignal-3.3.4-java lib/appsignal/hooks/redis.rb
appsignal-3.3.4 lib/appsignal/hooks/redis.rb
appsignal-3.3.3-java lib/appsignal/hooks/redis.rb
appsignal-3.3.3 lib/appsignal/hooks/redis.rb