Firefox OS/Metrics: Difference between revisions

no edit summary
No edit summary
Line 1: Line 1:
This is a placeholder page for design / discussion around Metrics in FxOS
=FTU ping=
 
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, no unique hardware identifiers.
 
Currently, the logic for the FTU ping is broken down like this:
# Unless the setting <tt>ftu.pingEnabled</tt> is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.
# Record the time the ping service started, to track the delta of time to a successful ping.
# Pull all relevant ping payload settings asynchronously.
# Create an interval timer to attempt a ping once an hour. This is configurable with <tt>ftu.pingTryInterval</tt>.
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting <tt>ftu.pingMaxNetworkFails</tt>.
## Send an HTTP request to <tt>FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID</tt>. By default, the ping URL is https://fxos.telemetry.mozilla.org, and is configurable in the <tt>ftu.pingURL</tt> setting, or via make with <tt>FTU_PING_URL</tt>.
### If the HTTP request succeeds, set <tt>ftu.pingEnabled</tt> to false, and disable the interval timer. Otherwise, try again on the next interval.
 
==Example payload and URL==
<tt>POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133</tt>
 
<code><pre>
{
    "activationTime": 1395769944966,
    "devicePixelRatio": 1,
    "deviceinfo.firmware_revision": "",
    "deviceinfo.hardware": "qcom",
    "deviceinfo.os": "1.5.0.0-prerelease",
    "deviceinfo.platform_build_id": "20140325104133",
    "deviceinfo.platform_version": "31.0a1",
    "deviceinfo.product_model": "ALCATEL ONE TOUCH FIRE",
    "deviceinfo.software": "Boot2Gecko 1.5.0.0-prerelease",
    "deviceinfo.update_channel": "default",
    "icc": {
        "mcc": "310",
        "mnc": "410",
        "spn": null
    },
    "locale": "en-US",
    "network": {
        "mcc": "310",
        "mnc": "410",
        "operator": "AT&T"
    },
    "pingID": "e426da9f-2a29-4e09-895b-c883903956cb",
    "pingTime": 1395852542588,
    "screenHeight": 480,
    "screenWidth": 320
}
</pre></code>
 
=Phase 1=
=Phase 1=
==Requirements==
==Requirements==
23

edits