55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/oboe/inst/moped.rb', line 55
def command_with_oboe(command)
if Oboe.tracing? && !Oboe.layer_op && command.key?(:mapreduce)
begin
report_kvs = (:map_reduce)
report_kvs[:Map_Function] = command[:map]
report_kvs[:Reduce_Function] = command[:reduce]
rescue StandardError => e
Oboe.logger.debug "[oboe/debug] Moped KV collection error: #{e.inspect}"
end
Oboe::API.trace('mongo', report_kvs) do
command_without_oboe(command)
end
else
command_without_oboe(command)
end
end
|