Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Add METRICS.md and initial telemetry setup #134

Closed
Osmose opened this issue Sep 25, 2018 · 4 comments
Closed

Add METRICS.md and initial telemetry setup #134

Osmose opened this issue Sep 25, 2018 · 4 comments
Assignees
Milestone

Comments

@Osmose
Copy link
Contributor

Osmose commented Sep 25, 2018

To better understand how our add-on is used and how users shop on the web, we'd like to add some probes using Event Telemetry. A webextension API for Telemetry that includes events landed in 63: https://mail.mozilla.org/pipermail/firefox-dev/2018-August/006769.html

This gist contains the initial list of events we're interested in tracking. We'll also need a markdown file documenting our data collection; see the Notes metrics.md file for an example, although there's no strict format.

This issue will probably be split out to multiple issues, but we'll need to do some initial exploration to determine that split first.

@Osmose Osmose added this to the November MVP milestone Sep 25, 2018
@biancadanforth biancadanforth self-assigned this Sep 27, 2018
@Osmose
Copy link
Contributor Author

Osmose commented Sep 27, 2018

@chuckharmston Now that we have a list of the probes we want, should we start the data collection review? Would you be the one running that?

I'm not sure whether the feedback form needs to be part of that review, either.

@biancadanforth
Copy link
Collaborator

The first task here is to take the list of events we want to capture and draft a schema for Chuck and our data analyst to review. That would then be submitted for the formal Data Collection review.

Here are some examples of metrics docs from other Test Pilot projects (thanks Chuck for sharing):

https://github.com/mozilla/pulse/blob/master/docs/metrics.md
https://github.com/mozilla/notes/blob/master/docs/metrics.md
https://github.com/mozilla/speaktome/blob/master/docs/metrics.md
https://github.com/mozilla/universal-search/blob/master/docs/metrics.md (edited)
Aside from the schema and specification, I've found the operational definitions of terminology and the discussion of the research questions looking to be answered to be very helpful.

@Osmose
Copy link
Contributor Author

Osmose commented Sep 28, 2018

Chuck noted in Slack that we should not be collecting telemetry involving pages in private browsing mode, nor when Do Not Track or Tracking Protection are enabled.

@biancadanforth
Copy link
Collaborator

biancadanforth commented Oct 1, 2018

Here's an example of a WE that uses the new WE Telemetry API.

Here's a proof-of-concept I made: a simple WE that registers and records a telemetry event and scalar on start-up.

@biancadanforth biancadanforth changed the title Event telemetry Add METRICS.md and initial telemetry setup Oct 3, 2018
biancadanforth added a commit that referenced this issue Oct 3, 2018
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
biancadanforth added a commit that referenced this issue Oct 10, 2018
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
biancadanforth added a commit that referenced this issue Oct 10, 2018
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
biancadanforth added a commit that referenced this issue Oct 11, 2018
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
biancadanforth added a commit that referenced this issue Oct 11, 2018
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
biancadanforth added a commit that referenced this issue Oct 12, 2018
* Adds METRICS.md document in a new 'docs' subfolder.
* Adds 'telemetry.js' background script which registers all events and provides a wrapper method to record events.
  * The event 'send_system_notice' was originally 'send_system_notification', however, that exceeded the [string length limit](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#limits) imposed by Event Telemetry.
  * There is no need to unregister the events, as the events are only registered for the duration of the [current Firefox session](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl#484).

Note: This PR does not actually record any events. That will happen in subsequent PRs. For the setup here, I did confirm that I can successfully records events in 'about:telemetry#events-tab' once 'browser.telemetry.recordEvent' is called. This can be confirmed by adding `telemetry.recordEvent('badge_toolbar_button', 'toolbar_button', null, {badge_type: 'add'});` after `telemetry.init()` in './src/background/index.js'.
biancadanforth added a commit that referenced this issue Oct 15, 2018
Fix #134: Add METRICS.md and initial telemetry setup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants