function startTracing(addons) {
  // NOTE: this code is injected by string and cannot access any closure
  //     variables!
  // Register addons.
  for (var url in addons) {
    var name = addons[url]['name'];
    if (window.console) {
      console.log('WTF Addon Installed: ' + name + ' (' + url + ')');
    }
    wtf.addon.registerAddon(url, addons[url]);
  }

  // Show HUD.
  wtf.hud.prepare();

  // Start recording.
  wtf.trace.start();
}
In-page trace preparation function.
This is directly inserted into the page and should run immediately after
the library has been loaded.

This function is stringified and passed to the page, so expect no closure
variables and all arguments must be serializable.

@param {!Object.<!Object>} addons A map of URL to addon JSON.