Skip to content

Redesign HTTPS statistics to use new Firefox Telemetry - #234

Merged
bdaehlie merged 5 commits into
masterfrom
new_https_stats
Jan 24, 2018
Merged

Redesign HTTPS statistics to use new Firefox Telemetry #234
bdaehlie merged 5 commits into
masterfrom
new_https_stats

Conversation

@jcjones

@jcjones jcjones commented Jan 23, 2018

Copy link
Copy Markdown
Contributor

Mozilla in Firefox 58 has removed API access to release telemetry for many probes, including HTTP_PAGELOAD_IS_SSL, but has provided a dimensional dataset via SQL [1][2].

This patch changes acquisition of the HTTPS adoption data into two parts:

  1. The historical data, which has been shown here for Let's Encrypt for some time. This file was cut at the date where the new data begins, 2016-11-01. Note that this is the same data as https://ct.tacticalsecret.com/secure-pageloads.tsv but trimmed and converted to CSV.

  2. The current data, which is generated ~daily by Mozilla. Currently this dataset is not published by Mozilla on a Mozilla property (being remedied), but for now it can be downloaded from https://ct.tacticalsecret.com/current-https-adoption.csv . Operations will need to configure the web server to download this file at a regular occurrence and overwrite the one being checked in as part of this commit.

These two parts are stitched together by the httpsPlot() method, which is now called via a Promise.all() to ensure that the two dependent fetches both complete before we start to plot the data.

The current dataset has dimensionality for the adoption figures broken out by operating system and country. (Note: Country is by geo-ip of the submission, not localization.)

The graphing code has provisions within it to graph any combination of country and operating system (see the list in httpsPlot()). It should be straightforward to modify this code to add in a user interface to plot custom graphs. gHttpsData.countryList and gHttpsData.osList are populated with the available data for each.

Note: Not all dimensions will have data for each day. If there were too few pings for a given OS / Country combination, there will not be data in the dataset. This is not a bug, it is a deliberate outcome of Firefox Telemetry's privacy policy.

Since this uses Promises and Fetch, it is incompatible with Internet Explorer. That is probably not a concern?

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1414839
[2] mozilla/data-docs#80

Preview

image

Mozilla in Firefox 58 has removed API access to release telemetry for many
probes, including HTTP_PAGELOAD_IS_SSL, but has provided a dimensional dataset
via SQL [1][2].

This patch changes acquisition of the HTTPS adoption data into two parts:

 1. The historical data, which has been shown here for Let's Encrypt for some
    time. This file was cut at the date where the new data begins, 2016-11-01.
    Note that this is the same data as
    https://ct.tacticalsecret.com/secure-pageloads.tsv but trimmed and converted
    to CSV.

 2. The current data, which is generated ~daily by Mozilla. Currently this
    dataset is not published by Mozilla on a Mozilla property (being remedied),
    but for now it can be downloaded from
    https://ct.tacticalsecret.com/current-https-adoption.csv . Operations will
    need to configure the web server to download this file at a regular
    occurrence and overwrite the one being checked in as part of this commit.

These two parts are stitched together by the `httpsPlot()` method, which is
now called via a `Promise.all()` to ensure that the two dependent fetches
both complete before we start to plot the data.

The current dataset has dimensionality for the adoption figures broken out by
operating system and country. (Note: Country is by geo-ip of the submission, not
localization.)

The graphing code has provisions within it to graph any combination of country
and operating system (see the list in `httpsPlot()`). It should be
straightforward to modify this code to add in a user interface to plot custom
graphs. `gHttpsData.countryList` and `gHttpsData.osList` are populated with
the available data for each.

Note: Not all dimensions will have data for each day. If there were too few
pings for a given OS / Country combination, there will not be data in the
dataset. This is not a bug, it is a deliberate outcome of Firefox Telemetry's
privacy policy.

Since this uses Promises and Fetch, it is incompatible with Internet Explorer.
That is probably not a concern?

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1414839
[2] mozilla/data-docs#80
Comment thread static/js/stats.js
}
{
let traceObj = { type: "scatter", x:[], y:[], name: "Germany users" }
httpsDerivePageloadsFromNormalizedData(traceObj, (os, country) => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this could be made more efficient than calling the heavy httpsDerivePageloadsFromNormalizedData method multiple times, but I wanted to go for clarity rather than speed.

Comment thread static/js/stats.js Outdated
let traces = [];

{
let traceObj = { type: "scatter", x:[], y:[], name: "Global users" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be clearer to write this as "All users"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated code and this PR's screenshot, thanks!

@bdaehlie
bdaehlie merged commit 589a8e7 into master Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants