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

Closes #18948: Update tabstray telemetry #19004

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

rocketsroger
Copy link
Contributor

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.

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

@rocketsroger rocketsroger added the needs:review PRs that need to be reviewed label Apr 13, 2021
@rocketsroger rocketsroger requested a review from jonalmeida April 13, 2021 20:18
@rocketsroger rocketsroger requested review from a team as code owners April 13, 2021 20:18
@rocketsroger rocketsroger added the needs:data-review PR is awaiting a data review label Apr 13, 2021
@rocketsroger
Copy link
Contributor Author

Request for data collection review

  1. What questions will you answer with this data?
    Understanding of how frequently user uses Synced Tabs
  2. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?

    This allows us to understand Synced Tabs feature priority
  3. What alternative methods did you consider to answer these questions? Why were they not sufficient?

    No alternative is available to answer this question.
  4. Can current instrumentation answer these questions?

    No current instrumentation can answer this question.
  5. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories found on the Mozilla wiki.
Measurement Description Data Collection Category Tracking Bug #
User switched to Synced Tab mode category 2 - interaction data #18948
  1. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.
    https://github.com/mozilla-mobile/fenix/blob/master/docs/metrics.md
  2. How long will this data be collected? Choose one of the following:

    This is scoped to a time-limited experiment/project until date 08-01-2022.
  3. What populations will you measure?

    No filters - all locales, channels, etc.
  4. If this data collection is default on, what is the opt-out mechanism for users?

    Default Glean SDK opt-out mechanism.
  5. Please provide a general description of how you will analyze this data.

    Glean / Amplitude
  6. Where do you intend to share the results of your analysis?

    Only on Glean, Amplitude and with mobile teams.
  7. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?
    
No third-party tool will use this data.

Copy link
Contributor

@jonalmeida jonalmeida left a comment

Choose a reason for hiding this comment

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

One question, but LGTM for a code review.

@@ -225,6 +227,11 @@ class TabsTrayFragment : AppCompatDialogFragment(), TabsTrayInteractor {
)
}

override fun onDestroyView() {
requireComponents.analytics.metrics.track(Event.TabsTrayClosed)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about adding this to onDestroyView. Would this be called even on non-user generated events? System wants to regain memory, for example.

Thinking about where else this could go, we could put it in the NavigationInteractor.onTabTrayDismissed

We can de-dupe the two callers dismissTabTray and dismissTabTrayAndNavigateHome, and make sure they both invoke the event.

Just a thought; haven't tested it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I'll update. Thanks,

) : BottomSheetBehavior.BottomSheetCallback() {

override fun onStateChanged(bottomSheet: View, newState: Int) {
if (newState == STATE_HIDDEN) {
metrics.track(Event.TabsTrayClosed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch!

@jonalmeida jonalmeida removed the needs:review PRs that need to be reviewed label Apr 13, 2021
@rocketsroger
Copy link
Contributor Author

One test is stuck. Closing and reopening to rerun them.

@travis79
Copy link
Member

Request for data collection review

1. What questions will you answer with this data?
   Understanding of how frequently user uses Synced Tabs

2. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?
   
   This allows us to understand Synced Tabs feature priority

3. What alternative methods did you consider to answer these questions? Why were they not sufficient?
   
   No alternative is available to answer this question.

4. Can current instrumentation answer these questions?
   
   No current instrumentation can answer this question.

5. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories found on the Mozilla wiki.

Measurement Description Data Collection Category Tracking Bug #
User switched to Synced Tab mode category 2 - interaction data #18948

1. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.
   [https://github.com/mozilla-mobile/fenix/blob/master/docs/metrics.md](https://github.com/mozilla-mobile/fenix/blob/master/docs/metrics.md?rgh-link-date=2021-04-13T20%3A31%3A54Z)

2. How long will this data be collected? Choose one of the following:
   
   This is scoped to a time-limited experiment/project until date 08-01-2022.

3. What populations will you measure?
   
   No filters - all locales, channels, etc.

4. If this data collection is default on, what is the opt-out mechanism for users?
   
   Default Glean SDK opt-out mechanism.

5. Please provide a general description of how you will analyze this data.
   
   Glean / Amplitude

6. Where do you intend to share the results of your analysis?
   
   Only on Glean, Amplitude and with mobile teams.

7. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?
   
   No third-party tool will use this data.

Data Review

  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, through the metrics.md file and the Glean Dictionary.

  2. Is there a control mechanism that allows the user to turn the data collection on and off?
    Yes, via the "Send Usage Data" toggle in preferences.

  3. If the request is for permanent data collection, is there someone who will monitor the data over time?
    N/A. Collection set to end 2022-08-01.

  4. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?
    Category 2 - User Interaction.

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

  6. Does the instrumentation include the addition of any new identifiers?
    No.

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

  8. Does there need to be a check-in in the future to determine whether to renew the data?
    Collection scheduled to end 2022-08-01, product may review to extend collection before then.

  9. Does the data collection use a third-party collection tool?
    No.

Result

data-review+

@travis79 travis79 removed the needs:data-review PR is awaiting a data review label Apr 14, 2021
Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

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

Approval for data-review+ only, I didn't code-review this.

@codecov-io
Copy link

Codecov Report

Merging #19004 (5abe06d) into master (445091d) will increase coverage by 0.19%.
The diff coverage is 32.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #19004      +/-   ##
============================================
+ Coverage     34.14%   34.34%   +0.19%     
- Complexity     1575     1576       +1     
============================================
  Files           535      535              
  Lines         21636    21653      +17     
  Branches       3222     3227       +5     
============================================
+ Hits           7387     7436      +49     
+ Misses        13352    13334      -18     
+ Partials        897      883      -14     
Impacted Files Coverage Δ Complexity Δ
...a/org/mozilla/fenix/tabstray/TabsTrayController.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ava/org/mozilla/fenix/tabstray/TabsTrayFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ozilla/fenix/tabstray/TabsTrayInfoBannerBinding.kt 82.60% <0.00%> (-3.76%) 10.00 <0.00> (ø)
...a/org/mozilla/fenix/tabstray/TabsTrayViewHolder.kt 50.00% <0.00%> (-0.69%) 11.00 <0.00> (ø)
...ozilla/fenix/tabstray/TraySheetBehaviorCallback.kt 85.71% <ø> (-1.79%) 4.00 <0.00> (ø)
...java/org/mozilla/fenix/components/metrics/Event.kt 41.97% <100.00%> (+2.42%) 0.00 <0.00> (ø)
...la/fenix/components/metrics/GleanMetricsService.kt 26.41% <100.00%> (+4.79%) 5.00 <0.00> (ø)
...va/org/mozilla/fenix/tabstray/TabLayoutMediator.kt 85.71% <100.00%> (+14.88%) 5.00 <0.00> (ø)
...components/toolbar/BrowserToolbarMenuController.kt 58.29% <0.00%> (+0.50%) 0.00% <0.00%> (ø%)
... and 3 more

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 445091d...5abe06d. Read the comment docs.

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.

4 participants