Redesign HTTPS statistics to use new Firefox Telemetry - #234
Merged
Conversation
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
jcjones
commented
Jan 23, 2018
| } | ||
| { | ||
| let traceObj = { type: "scatter", x:[], y:[], name: "Germany users" } | ||
| httpsDerivePageloadsFromNormalizedData(traceObj, (os, country) => { |
Contributor
Author
There was a problem hiding this comment.
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.
alex
reviewed
Jan 23, 2018
| let traces = []; | ||
|
|
||
| { | ||
| let traceObj = { type: "scatter", x:[], y:[], name: "Global users" } |
Contributor
There was a problem hiding this comment.
Might be clearer to write this as "All users"
Contributor
Author
There was a problem hiding this comment.
Updated code and this PR's screenshot, thanks!
jcjones
force-pushed
the
new_https_stats
branch
from
January 23, 2018 00:59
b8b53fe to
47cf827
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.
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 aPromise.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.countryListandgHttpsData.osListare 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