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-3.12.3-java lib/appsignal/hooks/redis.rb
appsignal-3.12.3 lib/appsignal/hooks/redis.rb
appsignal-3.12.2-java lib/appsignal/hooks/redis.rb
appsignal-3.12.2 lib/appsignal/hooks/redis.rb
appsignal-3.12.1-java lib/appsignal/hooks/redis.rb
appsignal-3.12.1 lib/appsignal/hooks/redis.rb
appsignal-3.12.0-java lib/appsignal/hooks/redis.rb
appsignal-3.12.0 lib/appsignal/hooks/redis.rb
appsignal-3.11.0-java lib/appsignal/hooks/redis.rb
appsignal-3.11.0 lib/appsignal/hooks/redis.rb
appsignal-3.10.0-java lib/appsignal/hooks/redis.rb
appsignal-3.10.0 lib/appsignal/hooks/redis.rb
appsignal-3.9.3-java lib/appsignal/hooks/redis.rb
appsignal-3.9.3 lib/appsignal/hooks/redis.rb
appsignal-3.9.2-java lib/appsignal/hooks/redis.rb
appsignal-3.9.2 lib/appsignal/hooks/redis.rb
appsignal-3.9.1-java lib/appsignal/hooks/redis.rb
appsignal-3.9.1 lib/appsignal/hooks/redis.rb
appsignal-3.9.0-java lib/appsignal/hooks/redis.rb
appsignal-3.9.0 lib/appsignal/hooks/redis.rb