class Mongo::Index::View

Public Instance Methods

collect_index_kvs(op, args) click to toggle source

collect_kvs

Used to collect up information to report and build a hash with the Keys/Values to report.

# File lib/traceview/inst/mongo2.rb, line 183
def collect_index_kvs(op, args)
  kvs = { :Flavor => :mongodb, :Database => @collection.database.name }

  kvs[:QueryOp] = op
  kvs[:Collection] = @collection.name
  kvs[:RemoteHost] = @collection.database.client.cluster.addresses.first.to_s
  kvs[:Backtrace] = TraceView::API.backtrace if TraceView::Config[:mongo][:collect_backtraces]
rescue => e
  TraceView.logger.debug "[traceview/debug] #{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}" if TraceView::Config[:verbose]
ensure
  return kvs
end