Class: Mongo::Collection
- Inherits:
-
Object
- Object
- Mongo::Collection
- Includes:
- Oboe::Inst::Mongo
- Defined in:
- lib/oboe/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
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/oboe/inst/mongo.rb', line 112 def oboe_collect(m, args) begin 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[:Backtrace] = Oboe::API.backtrace if Oboe::Config[:mongo][:collect_backtraces] report_kvs[:QueryOp] = m report_kvs[:Query] = args[0].to_json if args and not args.empty? and args[0].class == Hash rescue Oboe.logger.debug "[oboe/debug] Exception in oboe_collect KV collection." end report_kvs end |