Sha256: 013887c33921e69f43342dc571e785f9a37dd8aedc7ec268876b586b15440d54

Contents?: true

Size: 514 Bytes

Versions: 420

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true

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

420 entries across 420 versions & 1 rubygems

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