Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #11118: Add missing telemetry #11446

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

sblatz
Copy link
Contributor

@sblatz sblatz commented Jun 10, 2020

This is mostly an extension of #11211, just tying up a couple loose ends on data we missed that's important. Also we now have more confidence that this format works, so we're adding a couple more.

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@sblatz sblatz force-pushed the add-ALL-the-telemetry branch from d87c092 to 6094f91 Compare June 10, 2020 20:03
@sblatz sblatz added the needs:data-review PR is awaiting a data review label Jun 10, 2020
@sblatz sblatz force-pushed the add-ALL-the-telemetry branch from 6094f91 to e462615 Compare June 10, 2020 20:04
@sblatz
Copy link
Contributor Author

sblatz commented Jun 10, 2020

Request for data collection review form

All questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection.

  1. What questions will you answer with this data?
  • What settings preferences do users have?
  • What % of our users have open_links_in_app enabled?
  • What % of our users have chosen each theme option?
  1. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?
  • It is crucial we know what types of user segments we have so we can prioritize certain features. It is also important for helping us drive decisions around resourcing. This data will help us better slice our user population & figure out retention metrics.
  1. What alternative methods did you consider to answer these questions? Why were they not sufficient?
  • We currently have preferenceToggled events for most of these. Unfortunately these queries are incredibly expensive to run and can often be error prone. Because of this, we are approaching it with a simpler metrics ping.
  1. Can current instrumentation answer these questions?
  • No, see above.
  1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories on the found on the Mozilla wiki.
  • All data is Category 2.
  1. How long will this data be collected?
  • Until 09/01/2020
  1. What populations will you measure?
  • All release, beta, and nightly users with telemetry enabled.
  1. Please provide a general description of how you will analyze this data.
  • Glean / Amplitude
  1. Where do you intend to share the results of your analysis?
  • Only on Glean, Amplitude and with mobile teams.

@sblatz sblatz requested a review from liuche June 10, 2020 20:06
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2020

Codecov Report

Merging #11446 into master will increase coverage by 0.03%.
The diff coverage is 53.19%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #11446      +/-   ##
============================================
+ Coverage     20.86%   20.90%   +0.03%     
- Complexity      678      680       +2     
============================================
  Files           372      372              
  Lines         14861    14884      +23     
  Branches       2000     2006       +6     
============================================
+ Hits           3101     3111      +10     
- Misses        11478    11484       +6     
- Partials        282      289       +7     
Impacted Files Coverage Δ Complexity Δ
...la/fenix/components/metrics/GleanMetricsService.kt 14.42% <53.19%> (+1.48%) 4.00 <1.00> (+1.00)
.../src/main/java/org/mozilla/fenix/utils/Settings.kt 68.60% <0.00%> (ø) 33.00% <0.00%> (+1.00%)
...ug/java/org/mozilla/fenix/DebugFenixApplication.kt 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...g/mozilla/fenix/crashes/CrashReporterController.kt 95.45% <0.00%> (+0.21%) 6.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31edbc9...9e462ac. Read the comment docs.

@sblatz sblatz force-pushed the add-ALL-the-telemetry branch from e462615 to 1759958 Compare June 10, 2020 20:18
@sblatz sblatz force-pushed the add-ALL-the-telemetry branch from 1759958 to 9e462ac Compare June 10, 2020 20:18
Copy link
Contributor

@liuche liuche left a comment

Choose a reason for hiding this comment

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

A few questions about the documentation here, but otherwise looks fine. Just want to double check that all the new things have been documented.

Data Review Form (to be filled by Data Stewards)

  1. Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?

Yes, 2 new items documented, r+ pending the other items that look new?

  1. Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, data collection controlled by Fenix data controls

  1. If the request is for permanent data collection, is there someone who will monitor the data over time?

Expiry set

  1. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Type 2, user interaction w/ settings

  1. Is the data collection request for default-on or default-off?

Default on

  1. Does the instrumentation include the addition of any new identifiers

No, user interactions only

  1. Is the data collection covered by the existing Firefox privacy notice?
    Yes

  2. Does there need to be a check-in in the future to determine whether to renew the data? (Yes/No) (If yes, set a todo reminder or file a bug if appropriate)**
    No, has expiry

  3. Does the data collection use a third-party collection tool? If yes, escalate to legal.

No

open_links_in_app:
type: string_list
description: >
Whether or not the user has the open links in apps feature enabled.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not a boolean? If there are other options, please list all of them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I see why now - can you list both true/false as the possible values, that will make it a little more clear. (Optionally explain why this needs to be string - it's in-code, but not here. OTOH if someone is analyzing this data, they might not care about why boolean vs string).

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay pt 3, I see we don't do this for other booleans either. I think this should be pretty clear, so just ignore me 😂

installationPing.checkAndSend()
}

private fun setPreferenceMetrics() {
// We purposefully make all of our preferences the string_list format to make data analysis
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see why this isn't a boolean now.

"top"
}

toolbarPosition.set(listOf(toolbarPositionSelection))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a new addition? If so, please document

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope! Part of the initial telemetry I forgot.

@@ -603,6 +649,8 @@ class GleanMetricsService(private val context: Context) : MetricsService {
showSearchShortcuts.set(context.settings().shouldShowSearchShortcuts.toStringList())
openLinksInAPrivateTab.set(context.settings().openLinksInAPrivateTab.toStringList())
searchSuggestionsPrivate.set(context.settings().shouldShowSearchSuggestionsInPrivate.toStringList())
showVoiceSearch.set(context.settings().shouldShowVoiceSearch.toStringList())
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these new additions to the pref-toggle-event or prefs-metrics ping? If so please document. Or was it one of the missing pings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope! Part of the initial telemetry I forgot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants