Mobile/Fennec/Android/Java telemetry: Difference between revisions

From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to navigation Jump to search
(Created page with "== Local development == This is currently how I (mcomella) test local telemetry. It could be improved. === Start a local gzip server === * Get a server: <pre>git clone https:...")
 
Line 13: Line 13:


=== Check the results ===
=== Check the results ===
* If you're using a local IP, make sure your computer & your device are on the same network
* e.g. for the core ping should be sent every time the application is opened so close and open fennec to be sure a ping is sent.
* e.g. for the core ping should be sent every time the application is opened so close and open fennec to be sure a ping is sent.
* The gzip server output should say which file the ping was saved in
* The gzip server output should say which file the ping was saved in
* `cat <that-file>` to ensure your ping looks correct.
* `cat <that-file>` to ensure your ping looks correct.

Revision as of 23:06, 11 April 2016

Local development

This is currently how I (mcomella) test local telemetry. It could be improved.

Start a local gzip server

  • Get a server:
    git clone https://github.com/vdjeric/gzipServer.git
  • You'll need to edit the .py file to remove the windows bindings (assuming you don't use windows)
  • You'll need to tell the script listen on your ip address. On OS X, run `ifconfig`, look under en0, get the "inet" address, and put in in the script.
  • Run the server locally:
    python gzipServer.py -p <port>

Enable telemetry on local builds

  • Go to TelemetryConstants, set UPLOAD_ENABLED to true, and change the DEFAULT_SERVER_URL to the ip address you set, i.e. `http://127.0.0.1:8080`. Be sure to get http vs. https correct!
  • Build!

Check the results

  • If you're using a local IP, make sure your computer & your device are on the same network
  • e.g. for the core ping should be sent every time the application is opened so close and open fennec to be sure a ping is sent.
  • The gzip server output should say which file the ping was saved in
  • `cat <that-file>` to ensure your ping looks correct.