Module: MongoDB::Instrumentation

Defined in:
lib/mongodb/instrumentation.rb,
lib/mongodb/instrumentation/command_subscriber.rb

Defined Under Namespace

Classes: CommandSubscriber

Class Method Summary collapse

Class Method Details

.instrument(tracer: OpenTracing.global_tracer) ⇒ Object


8
9
10
# File 'lib/mongodb/instrumentation.rb', line 8

def instrument(tracer: OpenTracing.global_tracer)
  Mongo::Monitoring::Global.subscribe(Mongo::Monitoring::COMMAND, MongoDB::Instrumentation::CommandSubscriber.new(tracer: tracer))
end