Class: Skylight::Probes::Mongo::Subscriber Private

Inherits:
Object
  • Object
show all
Includes:
Util::Logging
Defined in:
lib/skylight/probes/mongo.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

COMMANDS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

%i[insert find count distinct update findandmodify findAndModify delete aggregate].freeze
COMMAND_NAMES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{ findandmodify: "findAndModify".freeze }.freeze

Instance Method Summary collapse

Methods included from Util::Logging

#config_for_logging, #debug, #error, #fmt, #info, #log, #log_context, #raise_on_error?, #t, #trace, #trace?, #warn

Constructor Details

#initializeSubscriber

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Subscriber.



32
33
34
# File 'lib/skylight/probes/mongo.rb', line 32

def initialize
  @events = {}
end

Instance Method Details

#configObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

For logging



49
50
51
# File 'lib/skylight/probes/mongo.rb', line 49

def config
  Skylight.config
end

#failed(event) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



44
45
46
# File 'lib/skylight/probes/mongo.rb', line 44

def failed(event)
  end_instrumentation(event)
end

#started(event) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



36
37
38
# File 'lib/skylight/probes/mongo.rb', line 36

def started(event)
  begin_instrumentation(event)
end

#succeeded(event) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
# File 'lib/skylight/probes/mongo.rb', line 40

def succeeded(event)
  end_instrumentation(event)
end