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.0.11-java lib/appsignal/hooks/redis.rb
appsignal-3.0.11 lib/appsignal/hooks/redis.rb
appsignal-3.0.10-java lib/appsignal/hooks/redis.rb
appsignal-3.0.10 lib/appsignal/hooks/redis.rb
appsignal-3.0.9-java lib/appsignal/hooks/redis.rb
appsignal-3.0.9 lib/appsignal/hooks/redis.rb
appsignal-3.0.8-java lib/appsignal/hooks/redis.rb
appsignal-3.0.8 lib/appsignal/hooks/redis.rb
appsignal-3.0.7-java lib/appsignal/hooks/redis.rb
appsignal-3.0.7 lib/appsignal/hooks/redis.rb
appsignal-3.0.6-java lib/appsignal/hooks/redis.rb
appsignal-3.0.6 lib/appsignal/hooks/redis.rb
appsignal-3.0.5-java lib/appsignal/hooks/redis.rb
appsignal-3.0.5 lib/appsignal/hooks/redis.rb
appsignal-3.0.4-java lib/appsignal/hooks/redis.rb
appsignal-3.0.4 lib/appsignal/hooks/redis.rb
appsignal-3.0.4.alpha.1-java lib/appsignal/hooks/redis.rb
appsignal-3.0.4.alpha.1 lib/appsignal/hooks/redis.rb
appsignal-3.0.3-java lib/appsignal/hooks/redis.rb
appsignal-3.0.3 lib/appsignal/hooks/redis.rb