Migrate legacy events to glean
Categories
(Toolkit :: Telemetry, task)
Tracking
()
People
(Reporter: Dexter, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 obsolete file)
After talking to Nick Alexander, we decided it might be wise to file a bug to start thinking about ways we could automatically migrate legacy events to glean events.
This bug is exclusively for figuring out how can things be automatically migrated.
On a quick look, it sees like it might be possible to generate a glean identifier (and its related definition for the metrics YAML) by joining the legacy category, name, method and object for those events that only have one method or object. For example this:
creditcard:
manage:
description: >-
User interactions for credit card autofill preferences management UI.
objects:
- "manage"
methods:
- "show"
- "add"
- "delete"
- "show_entry"
- "edit"
could become something like this (generalized event):
creditcard:
manage:
type: event
description: |
User interactions for credit card autofill preferences management UI.
bugs:
- https://bugzilla.mozilla.org/000000
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=000000#c3
notification_emails:
- me@mozilla.com
expires: 2020-10-01
extra_keys:
element:
description: The source from which the login view was opened, e.g. "toolbar".
type: string
or this (specialized events)
creditcard.manage:
show:
type: event
description: |
User interactions for credit card autofill preferences management UI
bugs:
- https://bugzilla.mozilla.org/000000
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=000000#c3
notification_emails:
- me@mozilla.com
expires: 2020-10-01
creditcard.manage:
add:
type: event
description: |
User interactions for credit card autofill preferences management UI
bugs:
- https://bugzilla.mozilla.org/000000
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=000000#c3
notification_emails:
- me@mozilla.com
expires: 2020-10-01
This gets into the "generalized" vs "specialized" events topic that is currently being discussed at data-leads level, but we don't need to make any decision on this as part of this bug.
Nick, does this capture what we talked about?
Comment 1•1 year ago
|
||
Nick, does this capture what we talked about?
Yes, just so. When looking at the list of legacy events, I recall that there were a few different patterns. Using:
import yaml
events = yaml.safe_load(open('toolkit/components/telemetry/Events.yaml'))
simple = []
both = []
for category, names in events.items():
for name, event in names.items():
num_methods = len(event.get('methods', []))
num_objects = len(event.get('objects', []))
l = simple
if num_methods > 1 and num_objects > 1:
l = both
l.append((category, name, event))
print(f"#simple: {len(simple)}")
print(f"#complex: {len(both)}")
for c, n, _ in both:
print(c, n)
I see
#simple: 206
#complex: 8
addonsManager install
addonsManager manage
address doorhanger
creditcard doorhanger
pwmgr mgmt_interaction
relay_integration popup_option
telemetry.test test
intl.ui.browserLanguage action
Looking more closely at those, it really looks like the objects
should be an extra and the methods
are the events. This suggests that we could cover all of the existing events automatically. \o/
Comment 2•2 months ago
|
||
Comment 3•2 months ago
|
||
Comment on attachment 9423587 [details]
WIP: Bug 1863031 - Document deprecation and removal of Services.telemetry.recordEvent and registerEvents r?TravisLong!
Revision D221502 was moved to bug 1918226. Setting attachment 9423587 [details] to obsolete.
Comment 4•25 days ago
|
||
Migration of callers has been completed, the APIs have been removed, a note has been sent to firefox-dev and dev-platform. Time to close this bug!
Description
•