Sha256: 9d2cfbc3cdb36877276c2e4a05b5b8e443c0a9d8d52a59aec9dc957122a7baac

Contents?: true

Size: 558 Bytes

Versions: 108

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true

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

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

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

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

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
appsignal-4.3.3-java lib/appsignal/hooks/redis.rb
appsignal-4.3.3 lib/appsignal/hooks/redis.rb
appsignal-4.3.2-java lib/appsignal/hooks/redis.rb
appsignal-4.3.2 lib/appsignal/hooks/redis.rb
appsignal-4.3.1-java lib/appsignal/hooks/redis.rb
appsignal-4.3.1 lib/appsignal/hooks/redis.rb
appsignal-4.3.0-java lib/appsignal/hooks/redis.rb
appsignal-4.3.0 lib/appsignal/hooks/redis.rb
appsignal-4.2.3-java lib/appsignal/hooks/redis.rb
appsignal-4.2.3 lib/appsignal/hooks/redis.rb
appsignal-4.2.2-java lib/appsignal/hooks/redis.rb
appsignal-4.2.2 lib/appsignal/hooks/redis.rb
appsignal-4.2.1-java lib/appsignal/hooks/redis.rb
appsignal-4.2.1 lib/appsignal/hooks/redis.rb
appsignal-4.2.0-java lib/appsignal/hooks/redis.rb
appsignal-4.2.0 lib/appsignal/hooks/redis.rb
appsignal-4.1.3-java lib/appsignal/hooks/redis.rb
appsignal-4.1.3 lib/appsignal/hooks/redis.rb
appsignal-4.1.2-java lib/appsignal/hooks/redis.rb
appsignal-4.1.2 lib/appsignal/hooks/redis.rb