def start_recording(env=None):
 recorder_proxy.clear_for_current_request()
 if (env is None):
  env = os.environ
 if (not config.should_record(env)):
  return
 if memcache.add(lock_key(), 0, time=config.LOCK_TIMEOUT, namespace=config.KEY_NAMESPACE):
  recorder_proxy.set_for_current_request(Recorder(env))
  if config.DEBUG:
   logging.debug('Set recorder')

def start_recording ( env = None ) : recorder_proxy . clear_for_current_request ( ) if ( env is None ) : env = os . environ if ( not config . should_record ( env ) ) : return if memcache . add ( lock_key ( ) , 0 , time = config . LOCK_TIMEOUT , namespace = config . KEY_NAMESPACE ) : recorder_proxy . set_for_current_request ( Recorder ( env ) ) if config . DEBUG : logging . debug ( 'Set recorder' )
start recording rpc traces .