Sha256: c25761f70a2bc34e51ae8f29b44b5209854a19a4b6fb9d4982ccbf5c3d0e39d7

Contents?: true

Size: 879 Bytes

Versions: 34

Compression:

Stored size: 879 Bytes

Contents

require 'mongo'
if defined?(Mongo)
  Mongo::Connection.class_eval do

    def send_message_with_insight(operation, message, log_message=nil)
      Rack::Insight::MongoPanel.record(log_message || message) do
        send_message_without_insight(operation, message, log_message)
      end
    end
    alias_method_chain :send_message, :insight

    def send_message_with_safe_check_with_insight(operation, message, db_name, log_message=nil, last_error_params=false)
      Rack::Insight::MongoPanel.record(log_message || message) do
        send_message_with_safe_check_without_insight(operation, message, db_name, log_message, last_error_params)
      end
    end
    alias_method_chain :send_message_with_safe_check, :insight

    def receive_message_with_insight(operation, message, log_message=nil, socket=nil)
    end
  end
  alias_method_chain :receive_message, :insight
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
rack-insight-0.6.4 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.6.3 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.6.2 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.30 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.29 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.28 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.27 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.26 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.25 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.24 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.23 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.22 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.21 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.20 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.19 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.18 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.17 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.16 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.15 lib/rack/insight/panels/mongo_panel/mongo_extension.rb
rack-insight-0.5.14 lib/rack/insight/panels/mongo_panel/mongo_extension.rb