def leave_mongo_breadcrumb(event_name, event)
      message = MONGO_MESSAGE_PREFIX + event_name
      meta_data = {
        :event_name => MONGO_EVENT_PREFIX + event_name,
        :command_name => event.command_name,
        :database_name => event.database_name,
        :operation_id => event.operation_id,
        :request_id => event.request_id,
        :duration => event.duration
      }
      if (command = pop_command(event.request_id))
        collection_key = event.command_name == "getMore" ? "collection" : event.command_name
        meta_data[:collection] = command[collection_key]
        unless command["filter"].nil?
          filter = sanitize_filter_hash(command["filter"])
          meta_data[:filter] = JSON.dump(filter)
        end
      end
      meta_data[:message] = event.message if defined?(event.message)

      Bugsnag.leave_breadcrumb(message, meta_data, Bugsnag::Breadcrumbs::PROCESS_BREADCRUMB_TYPE, :auto)
    end
def leave_mongo_breadcrumb(event_name, event)
      message = MONGO_MESSAGE_PREFIX + event_name
      meta_data = {
        :event_name => MONGO_EVENT_PREFIX + event_name,
        :command_name => event.command_name,
        :database_name => event.database_name,
        :operation_id => event.operation_id,
        :request_id => event.request_id,
        :duration => event.duration
      }
      if (command = pop_command(event.request_id))
        collection_key = event.command_name == "getMore" ? "collection" : event.command_name
        meta_data[:collection] = command[collection_key]
        unless command["filter"].nil?
          filter = sanitize_filter_hash(command["filter"])
          meta_data[:filter] = JSON.dump(filter)
        end
      end
      meta_data[:message] = event.message if defined?(event.message)

      Bugsnag.leave_breadcrumb(message, meta_data, Bugsnag::Breadcrumbs::PROCESS_BREADCRUMB_TYPE, :auto)
    end
Generates breadcrumb data from an event

 @param event_name [String] the type of event
 @param event [Mongo::Event::Base] the mongo_ruby_driver generated event