Class: Bugsnag::MongoBreadcrumbSubscriber Private

Inherits:
Object
  • Object
show all
Defined in:
lib/bugsnag/integrations/mongo.rb

Overview

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.

Subscribes to, and creates breadcrumbs from, mongo_ruby_driver events

Constant Summary collapse

MONGO_MESSAGE_PREFIX =

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.

"Mongo query "
MONGO_EVENT_PREFIX =

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.

"mongo."
MONGO_COMMAND_KEY =

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.

:bugsnag_mongo_commands
MAX_FILTER_DEPTH =

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.

5

Instance Method Summary collapse

Instance Method Details

#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.

Listens to the ‘failed’ event, leaving a breadcrumb

Parameters:

  • event (Mongo::Event::Base)

    the mongo_ruby_driver generated event



35
36
37
# File 'lib/bugsnag/integrations/mongo.rb', line 35

def failed(event)
  leave_mongo_breadcrumb("failed", 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.

Listens to the ‘started’ event, storing the command for later usage

Parameters:

  • event (Mongo::Event::Base)

    the mongo_ruby_driver generated event



19
20
21
# File 'lib/bugsnag/integrations/mongo.rb', line 19

def started(event)
  leave_command(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.

Listens to the ‘succeeded’ event, leaving a breadcrumb

Parameters:

  • event (Mongo::Event::Base)

    the mongo_ruby_driver generated event



27
28
29
# File 'lib/bugsnag/integrations/mongo.rb', line 27

def succeeded(event)
  leave_mongo_breadcrumb("succeeded", event)
end