# File lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb, line 22 def completed(event) begin state = NewRelic::Agent::TransactionState.tl_get return unless state.is_execution_traced? segment = segments.delete(event.operation_id) segment.finish rescue Exception => e log_notification_error('completed', e) end end