Sha256: df9e37a70013e7f7c617cdfeea38673539ec1c1c0e76a0598dbfb6f8c7d0f9c0

Contents?: true

Size: 483 Bytes

Versions: 38

Compression:

Stored size: 483 Bytes

Contents

module Appsignal
  class Hooks
    # @api private
    class MongoRubyDriverHook < Appsignal::Hooks::Hook
      register :mongo_ruby_driver

      def dependencies_present?
        defined?(::Mongo::Monitoring::Global)
      end

      def install
        require "appsignal/integrations/mongo_ruby_driver"

        Mongo::Monitoring::Global.subscribe(
          Mongo::Monitoring::COMMAND,
          Appsignal::Hooks::MongoMonitorSubscriber.new
        )
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
appsignal-2.4.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.4.0 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.4.0.alpha.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.7 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.6 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.6.beta.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.4 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.3 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.3.beta.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.2 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.0 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.0.beta.3 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.0.beta.2 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.3.0.beta.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.2.1 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.2.0 lib/appsignal/hooks/mongo_ruby_driver.rb
appsignal-2.2.0.beta.1 lib/appsignal/hooks/mongo_ruby_driver.rb