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.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/appstats/recording.py/start_recording