QA/Telemetry/Logging

From MozillaWiki
Jump to navigation Jump to search

Quick Summary

The following document will show users how to enable telemetry debugging logging and list other commands that can be used to retrieve logging information from the browser.

Enabling Logging

Note: You'll also need to add the experiments.logging.level;0 preference under about:config for the logging information to correctly appear under the Browser Console.

You'll need to enable chrome and addon debugging under Developer Tools to get more details in the Browser Console.

  • Click the Open Menu on the right side of the browser and than click on Developer then Toggle Tools
  • Once you have the Developer Tools opened, select Settings (the gear icon)

SettingsDev.png

  • Under Advanced Settings, you'll need to enable the following option:
    • Select: Enable chrome and addon debugging

DevTools.png

Once you have enabled chrome and addon debugging you should start seeing log entries appearing under the Browser Console. Here's a quick way to ensure that logging is working correctly:

  • Enable/Disable the experiments.enabled preference under about:config (You should see similar entries inside the browser console)

1397078500406 Browser.Experiments.Experiments TRACE Experiments #0::_toggleExperimentsEnabled(false)
1397078500406 Browser.Experiments.Experiments TRACE Experiments #0::disableExperiment()
1397078500406 Browser.Experiments.Experiments TRACE Experiments #0::_run
1397078500407 Browser.Experiments.Experiments TRACE Experiments #0::_main iteration
1397078500407 Browser.Experiments.Experiments TRACE Experiments #0::_evaluateExperiments
1397078500411 Browser.Experiments.Experiments TRACE Experiments #0::_main finished, scheduling next run
1397078501152 Browser.Experiments.Experiments TRACE Experiments #0::_toggleExperimentsEnabled(true)
1397078501152 Browser.Experiments.Experiments TRACE Experiments #0::updateManifest()
1397078501152 Browser.Experiments.Experiments TRACE Experiments #0::_run

Using Commands inside Browser Console

You can also retrieve some logging information by inserting the following commands into the Browser Console:

Import TelemetryLog.jsm in the Browser Console using the following command:

  • Command: Cu.import("resource://gre/modules/TelemetryLog.jsm");

One you've imported TelemetryLog.jsm, you can retrieve the logs using the following command:

  • TelemetryLog.entries().toSource();