edit metrics doc #82
edit metrics doc #82
Conversation
|
Overall this looks great, and understandable. There's a few questions inline, and one ( |
| @@ -94,13 +79,13 @@ Services.telemetry.registerEvents("event_category", { | |||
| For our purposes, we will use the `extra` field for a few purposes: | |||
| - To log the UUID of the item that has been added or changed (e.g. `"item_id": UUID`) | |||
| - To log the fields that are modified when an item is updated in the datastore (e.g. `"fields": "password,notes"` (because the value has to be a string we will have to concat the fields that were updated somehow) | |||
| - To log the fields that are modified when an item is updated in the datastore (e.g. `"fields": "username,passsword,address"` (because the value has to be a string we will have to concat the fields that were updated somehow) | |||
linuxwolf
Feb 19, 2019
Contributor
For clarification: this address refers to the "Website address" in the UI prototypes?
For clarification: this address refers to the "Website address" in the UI prototypes?
irrationalagent
Feb 19, 2019
Author
Contributor
yes, I should change it to hostname
yes, I should change it to hostname
| 2. `iconClick` fires when someone clicks the toolbar icon. **objects**: toolbar | ||
| 3. `show` events fire when various UI elements are rendered shown to the user. **objects**: `item_list_manager`, `item_list_doorhanger`, `item_detail_doorhanger` `item_detail_manager`, `new_item`, `item_edit`, `delete_confirm`, `connect_another_device`, `reconnect_sync` **value** should be a boolean for `item_list_*` events indicating whether any logins are in the login list (e.g. `False` if the list is empty). |
linuxwolf
Feb 19, 2019
Contributor
Note that "sign into Sync" and "reconnect Sync" take the user outside of Lockbox and into Firefox preference views.
I don't think we can technically record a show event for reconnect_sync, though we could record a click event.
Note that "sign into Sync" and "reconnect Sync" take the user outside of Lockbox and into Firefox preference views.
I don't think we can technically record a show event for reconnect_sync, though we could record a click event.
| - `loginCount` (SCALAR_TYPE_COUNT). Current count of the number of items in the user's login storage. If possible, this scalar should be set upon opening either the doorhanger or full extension interface. | ||
| - `loginsAccessedAllTime` (SCALAR_TYPE_COUNT). Running total of logins accessed (copied, revealed) through the extension interface or doorhanger. Should never be reset. |
linuxwolf
Feb 19, 2019
Contributor
it's not clear to me, from the interface descriptions, how possible either this or loginsAccessed is from the Telemetry WebExtension API. One of them definitely is, but it's not clear which; not clear how much effort it will take to have both.
it's not clear to me, from the interface descriptions, how possible either this or loginsAccessed is from the Telemetry WebExtension API. One of them definitely is, but it's not clear which; not clear how much effort it will take to have both.
jaredhirsch
Feb 20, 2019
Contributor
I'm pretty sure that scalarAdd increments a per-browsing session counter, so loginsAccessedAllTime would require saving the all-time count in webextension browser storage (not that hard to do).
I'm pretty sure that scalarAdd increments a per-browsing session counter, so loginsAccessedAllTime would require saving the all-time count in webextension browser storage (not that hard to do).
|
Would still very much want to get @6a68 thoughts. |
|
Looks great! Added a few comments for you |
|
|
||
| Instead we will define our events by **registering** them using a call to `Services.telemetry.registerEvents(category, eventData)`. | ||
| Events are defined by **registering** them using a call to `Services.telemetry.registerEvents(category, eventData)`. |
jaredhirsch
Feb 20, 2019
Contributor
Not sure if it matters, but the registration happens via browser.telemetry, though that's just a passthru to Services.telemetry 🤷♂️
Not sure if it matters, but the registration happens via browser.telemetry, though that's just a passthru to Services.telemetry
| These are the metrics we currently collect regarding the state of user datastores. | ||
| These are the metrics we currently collect regarding the state of the user's login storage. | ||
| - `loginCount` (SCALAR_TYPE_COUNT). Current count of the number of items in the user's login storage. If possible, this scalar should be set upon opening either the doorhanger or full extension interface. |
jaredhirsch
Feb 20, 2019
Contributor
We can definitely trigger this ping when the user opens the doorhanger or loads the management page.
Would it also be useful to check this value if the user doesn't interact with Lockbox? For instance, we could check this value at browser startup, or periodically (whenever Firefox is open).
We can definitely trigger this ping when the user opens the doorhanger or loads the management page.
Would it also be useful to check this value if the user doesn't interact with Lockbox? For instance, we could check this value at browser startup, or periodically (whenever Firefox is open).
linuxwolf
Feb 20, 2019
Contributor
Relaying from an earlier IRL conversation when I asked exactly this: these metrics are also measuring as user's engagement with Lockbox specifically, so it's preferable to limit to triggers specific to interacting with Lockbox.
Relaying from an earlier IRL conversation when I asked exactly this: these metrics are also measuring as user's engagement with Lockbox specifically, so it's preferable to limit to triggers specific to interacting with Lockbox.
irrationalagent
Feb 20, 2019
Author
Contributor
Yes +1 to Matt, trying to limit pings with extension data to those who are actually using it (makes counting things like "active" users a bit easier).
Yes +1 to Matt, trying to limit pings with extension data to those who are actually using it (makes counting things like "active" users a bit easier).
| For our internal alpha release, we will be making use of the public JavaScript API that allows recording and sending of event data and scalar data through an add-on. The API is documented here: | ||
|
|
||
| https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#the-api | ||
| To record Telemetry we will be making use of the public JavaScript API that allows recording and sending of [events](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html#public-js-api) and [scalar measurements](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/scalars.html#js-api) through a webextension. |
jaredhirsch
Feb 20, 2019
Contributor
About the use of the term 'public' here: the telemetry API is only exposed to Mozilla addons; 'Mozilla privileged' might be more accurate.
About the use of the term 'public' here: the telemetry API is only exposed to Mozilla addons; 'Mozilla privileged' might be more accurate.
| - `loginCount` (SCALAR_TYPE_COUNT). Current count of the number of items in the user's login storage. If possible, this scalar should be set upon opening either the doorhanger or full extension interface. | ||
| - `loginsAccessedAllTime` (SCALAR_TYPE_COUNT). Running total of logins accessed (copied, revealed) through the extension interface or doorhanger. Should never be reset. |
jaredhirsch
Feb 20, 2019
Contributor
I'm pretty sure that scalarAdd increments a per-browsing session counter, so loginsAccessedAllTime would require saving the all-time count in webextension browser storage (not that hard to do).
I'm pretty sure that scalarAdd increments a per-browsing session counter, so loginsAccessedAllTime would require saving the all-time count in webextension browser storage (not that hard to do).
| - `loginsAccessedAllTime` (SCALAR_TYPE_COUNT). Running total of logins accessed (copied, revealed) through the extension interface or doorhanger. Should never be reset. | ||
| - `loginsAccessed` (SCALAR_TYPE_COUNT). Total of logins accessed (copied, revealed) since last ping through the extension interface or doorhanger. TODO: in native code scalars are automatically reset when a new ping is cut. Will that happen for us? |
jaredhirsch
Feb 20, 2019
Contributor
This should be easy on a per-session basis.
I believe the pings should be reset the same way as native code, since the browser.telemetry APIs are just a passthrough to the Services.telemetry APIs. @georgf might know for sure.
This should be easy on a per-session basis.
I believe the pings should be reset the same way as native code, since the browser.telemetry APIs are just a passthrough to the Services.telemetry APIs. @georgf might know for sure.
georgf
Feb 20, 2019
That’s correct, they reset per ping/subsession.
The semantics for the web extension Telemetry API are the same, it’s just a different way to access them.
That’s correct, they reset per ping/subsession.
The semantics for the web extension Telemetry API are the same, it’s just a different way to access them.
irrationalagent
Feb 20, 2019
Author
Contributor
Thanks for the clarification Georg. I'm going to remove the All-time scalar for now, this is relatively straightforward to compute on a per-client basis. It also mitigates some of the anonymity issues discussed with Jared.
Thanks for the clarification Georg. I'm going to remove the All-time scalar for now, this is relatively straightforward to compute on a per-client basis. It also mitigates some of the anonymity issues discussed with Jared.
| 1. `startup` fires when the webextension is loaded. **objects**: webextension. Note that this event fires whenever the browser is started, so is not indicative of direct user interaction with Lockbox. | ||
| 2. `click` fires when someone clicks on one of the UI elements listed **objects**: `toolbar`, `get_mobile`, `faq`, `account_settings`, `give_feedback`, `settings_menu`, `reconnect_sync`, `signin_sync` (or whatever the menu is that contains links to account settings, faq, etc). **value** is null. |
jaredhirsch
Feb 20, 2019
Contributor
Do we want a separate event if users do things with the keyboard instead of the mouse? (Accessibility and keyboard-centric power users)
Do we want a separate event if users do things with the keyboard instead of the mouse? (Accessibility and keyboard-centric power users)
irrationalagent
Feb 20, 2019
Author
Contributor
Good question. I don't see myself utilizing that information, but if it would help engineering to have that data I'm happy to add it. And I should say more broadly, if there is any data that engineering would find useful to collect, we should add that.
Good question. I don't see myself utilizing that information, but if it would help engineering to have that data I'm happy to add it. And I should say more broadly, if there is any data that engineering would find useful to collect, we should add that.
jaredhirsch
Feb 21, 2019
Contributor
I guess it's really a question of whether product would find the key vs. click (vs. tap, since some desktops have touch screens...) distinction useful or not.
I guess it's really a question of whether product would find the key vs. click (vs. tap, since some desktops have touch screens...) distinction useful or not.
linuxwolf
Feb 21, 2019
Contributor
@mozilla-lockbox/product is the distinction (click vs tap vs keypress) useful to track?
@mozilla-lockbox/product is the distinction (click vs tap vs keypress) useful to track?
sandysage
Feb 21, 2019
It'd be cool to track but I don't think it's going to give us relevant insights on their own. For now, we probably want to just track that someone did the thing. We can always layer in the distinction at a later time when we have a specific need to identify the methods by which people navigate.
It'd be cool to track but I don't think it's going to give us relevant insights on their own. For now, we probably want to just track that someone did the thing. We can always layer in the distinction at a later time when we have a specific need to identify the methods by which people navigate.
|
Rebased and force-pushed. |
Connected to #29 and #5
Testing and Review Notes
These are the metrics I'm proposing for the first iteration of the addon.
I based the event schemas on the invision designs. If there's other nomenclature that is better compatible with what's in the code, I'm fine with that.
Also, note that a couple of scalars that I proposed might pose technical hurdles. Happy to talk about that.
I also left out the monitor bits for now.