Class: Mongo::Collection

Inherits:
Object
  • Object
show all
Includes:
Oboe::Inst::Mongo
Defined in:
lib/oboe/frameworks/rails/inst/mongo.rb

Constant Summary

Constants included from Oboe::Inst::Mongo

Oboe::Inst::Mongo::COLL_INDEX_OPS, Oboe::Inst::Mongo::COLL_QUERY_OPS, Oboe::Inst::Mongo::COLL_WRITE_OPS, Oboe::Inst::Mongo::CURSOR_OPS, Oboe::Inst::Mongo::DB_OPS, Oboe::Inst::Mongo::FLAVOR

Instance Method Summary collapse

Instance Method Details

#oboe_collect(m, args) ⇒ Object



108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/oboe/frameworks/rails/inst/mongo.rb', line 108

def oboe_collect(m, args)
  report_kvs = {}
  report_kvs[:Flavor] = Oboe::Inst::Mongo::FLAVOR

  report_kvs[:Database] = @db.name
  report_kvs[:RemoteHost] = @db.connection.host
  report_kvs[:RemotePort] = @db.connection.port
  report_kvs[:Collection] = @name

  report_kvs[:QueryOp] = m 
  report_kvs[:Query] = args[0].try(:to_json) if args and not args.empty? and args[0].class == Hash
  report_kvs
end