Add ecosystemClientId to the Accounts Ecosystem Telemetry ping
Categories
(Toolkit :: Telemetry, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: rfkelly, Assigned: lina)
References
Details
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
2.89 KB,
text/plain
|
chutten
:
data-review+
|
Details |
As described in Account Ecosysten Telemetry Identifiers, the AET ping needs to include an ecosystemClientId
field that is very similar to, but not linked to, the main-ping clientId
. This is a randomly-generated identifier that is unique to a particular Firefox profile.
We will need to:
- Manage persistence of such an identifier, creating a new random one if it doesn't already exist
- Arrange for it to be included in the ecosystem telemetry ping that results from Bug 1635659.
- Arrange for it to be included in the
deletion-request
ping for users who opt out of telemetry.
I haven't looked into the details of doing this at all, but I'm kind of hopeful that we can wholesale copy how the main telemetry clientId
is managed...
Comment 1•5 years ago
|
||
Chiming in to say: Another important aspect of any client-id-alike will be that it is cleared to a canary value on opt-out and is set to a new value if the user opts back in.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
:chutten, since we want this to have the same semantics as the client ID (clear to canary on opt-out, reset on opt-in), we were wondering if we can add the ecosystemClientId
to ClientID.jsm
(it wouldn't be the client ID, but a new random ID that's reset and cleared together with it), and add accessors for it?
Comment 4•5 years ago
|
||
Another question I have relates to the async nature of this system. TelemetryControllerParent really doesn't want to await
fetching the clientID. The patch in bug 1635659 already await
s on FxA as part of submitting the ping, but I'm not sure how much of a problem this is.
So if we assume that the response to Lina's question means that ClientID.jsm can be used and ends up with (say) getEcosystemClientID()
and getCachedEcosystemClientID()
, I'm not clear whether:
EcosystemTelemetry.jsm
can just useClientID.jsm
directly and callgetCachedEcosystemClientID()
, thenawait getEcosystemClientID()
if that returned null, and stick the result directly in the payload.
or
- We should thread support for this ID into TelemetryControllerParent in the same way it already supports the plain old
clientID
(including the reporting of a histogram if it's not available like it does forclientID
), andEcosystemTelemetry.jsm
just passes (say)includeEcosystemClientId: true
inoptions
?
Comment 5•5 years ago
|
||
Adding additional client_id-like ID support to ClientID.jsm
was the original preferred design, and to my knowledge nothing has changed to invalidate that design. So please do go ahead! (( Originally I think we were going to make it a named key generator/store for client_id-like IDs that any subsystem might use/want, but I think with Glean coming that it makes sense to keep this specific to the ecosystem_client_id instead of generic ))
I prefer EcosystemTelemetry using ClientID directly to get the client id. If we added it to submitExternalPing it might make others think they should use it (I already have this qualm about the useEncryption
options, but there were other factors there that made this the least bad design). Also: The ecosystem client id is inside the payload, yes? Then it makes more sense to have it out where the payload is being assembled. (submitExternalPing should treat the payload opaquely as much as possible).
Assignee | ||
Comment 6•5 years ago
|
||
This commit adds a new ecosystem client ID to ClientID.jsm
. It's
handled the same way as a regular telemetry client ID, in that it's a
random UUID that's persisted to disk, and reset together with the
client ID. Unlike the main client ID, we don't cache it in prefs.
Assignee | ||
Comment 7•5 years ago
|
||
For deletion-request
handling, I guess we'll want to hook into here and include the old ecosystem client ID in the payload (along with scalars
), right?
Would we also want to include the anonymized user ID (ecosystem_anon_id
here)? Or is the ecosystem_client_id
sufficient—IOW, if you opt out of telemetry collection on Desktop, we'll still retain data from iOS and Fenix with the same ecosystem_anon_id
, just not the client ID?
Reporter | ||
Comment 8•5 years ago
|
||
Would we also want to include the anonymized user ID (ecosystem_anon_id here)?
We should include only the device-specific identifier, not the account-level identifier.
IOW, if you opt out of telemetry collection on Desktop, we'll still retain data from iOS and Fenix with the same ecosystem_anon_id
Right, this is the intended behaviour. Users can delete the telemetry for their whole account by deleting their account.
Assignee | ||
Comment 9•5 years ago
|
||
Thanks, that matches my understanding!
Comment 10•5 years ago
|
||
(In reply to Lina Cambridge [:lina] from comment #7)
For
deletion-request
handling, I guess we'll want to hook into here and include the old ecosystem client ID in the payload (along withscalars
), right?Would we also want to include the anonymized user ID (
ecosystem_anon_id
here)? Or is theecosystem_client_id
sufficient—IOW, if you opt out of telemetry collection on Desktop, we'll still retain data from iOS and Fenix with the sameecosystem_anon_id
, just not the client ID?
The intention with the "deletion-request" ping is for any ride-along ids to be stored as a Scalar in the "deletion-request" store so that it'll get picked up automagically (See these other ids for example). If you set the ride along scalar value on ClientID.jsm's updateEcosystemClientId
and that should be that.
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
|
||
Slavishly copied from Ryan's data review request in bug 1604844, with appropriate changes (ecosystem client ID will only be sent if the user has signed in to FxA).
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
Backed out for failures on test_client_id.js
backout: https://hg.mozilla.org/integration/autoland/rev/c68ce4b312265e9f640e4d72c84f41b9b45bbc4f
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=311009164&repo=autoland&lineNumber=3017
[task 2020-07-24T22:33:20.244Z] 22:33:20 INFO - TEST-START | toolkit/components/telemetry/tests/unit/test_client_id.js
[task 2020-07-24T22:33:21.271Z] 22:33:21 WARNING - TEST-UNEXPECTED-FAIL | toolkit/components/telemetry/tests/unit/test_client_id.js | xpcshell return code: 0
[task 2020-07-24T22:33:21.271Z] 22:33:21 INFO - TEST-INFO took 1026ms
[task 2020-07-24T22:33:21.271Z] 22:33:21 INFO - >>>>>>>
[task 2020-07-24T22:33:21.272Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | xpcw: cd /data/local/tmp/test_root/xpc/toolkit/components/telemetry/tests/unit
[task 2020-07-24T22:33:21.273Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | xpcw: xpcshell -r /data/local/tmp/test_root/xpc/c/httpd.manifest --greomni /data/local/tmp/test_root/xpcb/geckoview-androidTest.apk -m -e const _HEAD_JS_PATH = "/data/local/tmp/test_root/xpc/head.js"; -e const _MOZINFO_JS_PATH = "/data/local/tmp/test_root/xpc/p/mozinfo.json"; -e const _PREFS_FILE = "/data/local/tmp/test_root/xpc/user.js"; -e const _TESTING_MODULES_DIR = "/data/local/tmp/test_root/xpc/m"; -f /data/local/tmp/test_root/xpc/head.js -e const _HEAD_FILES = ["/data/local/tmp/test_root/xpc/toolkit/components/telemetry/tests/unit/head.js"]; -e const _JSDEBUGGER_PORT = 0; -e const _TEST_FILE = ["test_client_id.js"]; -e const _TEST_NAME = "toolkit/components/telemetry/tests/unit/test_client_id.js"; -e _execute_test(); quit(0);
[task 2020-07-24T22:33:21.273Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Unnamed thread 75a2681219b0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 202
[task 2020-07-24T22:33:21.273Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Unnamed thread 75a2681219b0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 202
[task 2020-07-24T22:33:21.274Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Unnamed thread 75a2681219b0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 202
[task 2020-07-24T22:33:21.274Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Unnamed thread 75a2681219b0] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 202
[task 2020-07-24T22:33:21.274Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Main Thread] WARNING: No Android crash handler set: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 1959
[task 2020-07-24T22:33:21.274Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Main Thread] WARNING: No default pref files found.: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp, line 4240
[task 2020-07-24T22:33:21.275Z] 22:33:21 INFO - toolkit/components/telemetry/tests/unit/test_client_id.js | [6836, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 2914
[task 2020-07-24T22:33:21.275Z] 22:33:21 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
Comment 15•5 years ago
|
||
Assignee | ||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
bugherder |
Description
•