You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mongo_ruby_driver.rb
    path of file: ./repos/appsignal-ruby/lib/appsignal/integrations
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Appsignal
  class Hooks
    # @api private
    class MongoMonitorSubscriber
      # Called by Mongo::Monitor when query starts
      def started(event)
        return unless Appsignal::Transaction.current?

        transaction = Appsignal::Transaction.current
        return if transaction.pau
    
      def started(event)
        return unless Appsignal::Transaction.current?

        transaction = Appsignal::Transaction.current
        return if transaction.paused?

        # Format the command
        command = Appsignal::EventFormatter::MongoRubyDriver::QueryFormatter
          .format(event.command_name, event.command)

        # Store the query on the transaction, we need it when the event finishes
        store                   = transaction.store("mongo_driver")
        store[event.request_id] = command

        # Start this event
        transaction.start_event
      end