[Thunderbird Telemetry] Enable telemetry reporting in appropriate builds.
Categories
(Thunderbird :: General, task)
Tracking
(thunderbird_esr78+ fixed)
People
(Reporter: benc, Assigned: benc)
References
Details
(Whiteboard: [TM:78.something])
Attachments
(2 files, 3 obsolete files)
|
10.46 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
|
1.42 KB,
patch
|
mkmelin
:
review+
wsmwk
:
approval-comm-esr78+
|
Details | Diff | Splinter Review |
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
The bulk of this patch is just notes on getting telemetry flowing. Details in mail/components/telemetry/README.md.
To get telemetry pings reporting locally:
- Rebuild with this patch.
- in your
prefs.js, add most of the settings I recommend under the "Runtime prefs for testing" section in the README. - run a local web server to display the data locally (see links in README)
- try a test ping to make sure it's all set up correctly (again, see README)
If you add the html/text composition probe in Bug 1584889, you should be able to see ping data reported with tb.compose.format_html and tb.compose.format_plain_text counts.
The data is reported at shutdown or after a submission interval (which defaults to hours. The README has info on reducing this for testing).
| Assignee | ||
Comment 2•5 years ago
|
||
Oh, my patch sets the endpoint thusly:
pref("toolkit.telemetry.server", "https://incoming.telemetry.thunderbird.net");
Obviously this needs a little coordination at the server end :-)
Sancus: Is this sane or do you have another URL in mind?
Comment 3•5 years ago
|
||
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
OK, this version removes the MOZ_SERVICES_HEALTHREPORT compiletime option and refines the notes a bit.
Here are example steps to see some telemetry pings:
- Apply Bug 1584889 (to record html/text composition)
- Apply this patch
- build
- to your profile dir, add
user.js:
user_pref("toolkit.telemetry.server", "http://localhost:12345");
user_pref("toolkit.telemetry.server_owner", "TimmyTestfish");
user_pref("toolkit.telemetry.log.level", "Trace");
user_pref("toolkit.telemetry.log.dump", true);
user_pref("toolkit.telemetry.send.overrideOfficialCheck", true);
user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification",true);
user_pref("services.sync.telemetry.submissionInterval", 20);
user_pref("datareporting.policy.dataSubmissionEnabled", true);
user_pref("datareporting.healthreport.uploadEnabled",true);
- run a local web server (I use
webhole -a :12345, but you'll probably find gzipServer simpler unless you've got golang installed). - run Thunderbird
- start writing a message, to log the text/html composition scalar. It is recorded as the composition is opened. You can close the window immediately.
- Wait 20 sec or so (
submissionInterval, above), or close TB to send pending pings. - see the lovely data appear on the server side. The html/text scalars are counted in
tb.compose.format_html/tb.compose.format_plain_text.
Comment 5•5 years ago
|
||
| Assignee | ||
Comment 6•5 years ago
|
||
magnus: new version with the tweaks you suggested. If you're still happy with it we can land it.
Comment 7•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/f8a6cf1ee08f
Add build and prefs config to enable Thunderbird telemetry reporting. r=mkmelin DONTBUILD
Updated•5 years ago
|
Comment 10•5 years ago
|
||
One of my profiles didn't want to start up with the backticks for quotes. Not sure it's really supported in that file. No idea why it's not consistent about failing though, but I pushed the fix.
Comment 11•5 years ago
|
||
l10n items are all complete except the privacy policy? (thinking of the string freeze so just double checking)
Comment 13•5 years ago
|
||
I'm getting an error on current Nightly when trying to get the client to send reports. It works correctly in Firefox(and fills up the server with reports, so that part's working).
Cu.import("resource://gre/modules/TelemetrySession.jsm");
TelemetrySession.testPing()
TypeError: can't access property "getFullYear", date is undefined TelemetryUtils.jsm:167:1
Other than this error, https://incoming-telemetry.thunderbird.net is working so assuming this can be resolved(or is somehow a configuration issue on my side) we can change the pref and start taking reports from Nightly.
Comment 14•5 years ago
|
||
Ping, can you take a look at ^^^ and see if you can reproduce?
I just tried that in the Error Console, and didn't get any error.
Comment 15•5 years ago
|
||
I don't see any error in my console as well. Maybe related to some configs.
Comment 16•5 years ago
|
||
There are some early returns above this line: https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/app/TelemetryController.jsm#845, I think session timestamps were initiated in this earlyInit function.
Comment 17•5 years ago
|
||
Note that this is on Windows. I just tried a completely fresh profile and still got that error.
Comment 18•5 years ago
|
||
I will try setting up the dev environment on Windows and get back to you later.
Comment 19•5 years ago
|
||
I did a fresh build on Windows, still no error. Then I downloaded the latest nightly installer from ftp.mozilla.org and can see the error.
Comment 20•5 years ago
|
||
(In reply to Ping Chen (:rnons) from comment #19)
I did a fresh build on Windows, still no error. Then I downloaded the latest nightly installer from ftp.mozilla.org and can see the error.
There are a bunch of settings documented in the Telemetry README https://searchfox.org/comm-central/source/mail/components/telemetry/README.md#108
I suspect that you need to set these before a fresh build will properly try to send a Telemetry ping, so that may be why you're not seeing it. I do still see it on Nightly(even after update to 2020-06-08), so, unless it is some weird Nightly build configuration issue, it's probably still bugged on trunk.
Comment 21•5 years ago
|
||
I think the configs you linked are to help investigating telemetry report data on local, basically sending the report to a local server. They're not required to run these two lines
Cu.import("resource://gre/modules/TelemetrySession.jsm");
TelemetrySession.testPing()
I have no clue why the Nightly build has this error. Is it possible to reproduce the nightly build on local?
Comment 22•5 years ago
|
||
To get the same build config as a nightly build, check https://searchfox.org/comm-central/source/mozilla/browser/config/mozconfigs/linux64/nightly
checking about:buildconfig could also be useful (available through Help | Troubleshooting information)
Comment 23•5 years ago
|
||
I did a build on local with MOZ_AUTOMATION=1 MOZ_FETCHES_DIR=/home/rnons/.mozbuild MOZCONFIG=comm/mail/config/mozconfigs/linux64/nightly ./mach build, I would expect that to be mostly equivalent to the nightly build. However, still no error.
I don't find much info on about:buildconfig page, Configure options are mostly equivalent to the nightly build
MOZ_AUTOMATION=1 --enable-application=comm/mail MOZILLA_OFFICIAL=1 --enable-update-channel= CC=/home/rnons/.mozbuild/clang/bin/clang CXX=/home/rnons/.mozbuild/clang/bin/clang++ NASM=/home/rnons/.mozbuild/nasm/nasm ENABLE_CLANG_PLUGIN=1 MOZ_STDCXX_COMPAT=1 MOZ_NO_PIE_COMPAT=1 RUSTC=/home/rnons/.cargo/bin/rustc CARGO=/home/rnons/.cargo/bin/cargo RUSTDOC=/home/rnons/.cargo/bin/rustdoc CBINDGEN=/home/rnons/.cargo/bin/cbindgen RUSTFMT=/home/rnons/.cargo/bin/rustfmt --enable-js-shell --enable-rust-simd NODEJS=/home/rnons/.mozbuild/node/bin/node --enable-default-toolkit=cairo-gtk3-wayland MAKE=/usr/bin/make --enable-crashreporter
Configure options of the Nightly build are
MOZ_AUTOMATION=1 --enable-application=comm/mail MOZILLA_OFFICIAL=1 --enable-update-channel=nightly MOZBUILD_STATE_PATH=/builds/worker/.mozbuild CC=/builds/worker/fetches/clang/bin/clang CXX=/builds/worker/fetches/clang/bin/clang++ NASM=/builds/worker/fetches/nasm/nasm ENABLE_CLANG_PLUGIN=1 MOZ_STDCXX_COMPAT=1 MOZ_NO_PIE_COMPAT=1 RUSTC=/builds/worker/fetches/rustc/bin/rustc CARGO=/builds/worker/fetches/rustc/bin/cargo RUSTDOC=/builds/worker/fetches/rustc/bin/rustdoc CBINDGEN=/builds/worker/fetches/cbindgen/cbindgen RUSTFMT=/builds/worker/fetches/rustc/bin/rustfmt --enable-js-shell --enable-rust-simd NODEJS=/builds/worker/fetches/node/bin/node --enable-default-toolkit=cairo-gtk3-wayland MAKE=/usr/bin/make --enable-crashreporter
Comment 24•5 years ago
|
||
Testing on 78.0b1 build4 still produces the error, I was hoping it was something to do with Nightly's build config specifically, but it seems like not.
Comment 25•5 years ago
|
||
This patch added TelemetryStartup.manifest to package-manifest.in. See the same line in m-c https://searchfox.org/mozilla-central/source/browser/installer/package-manifest.in#191.
TelemetryStartup is needed to forward the "profile-after-change" notification to TelemetryController.jsm.
https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/TelemetryStartup.jsm#19-23
I can't reproduce the error in comment 23, because I was running ./dist/bin/thunderbird and dist/bin/components/TelemetryStartup.manifest exists. The problem is TelemetryStartup.manifest is not included in the released package.
Comment 26•5 years ago
|
||
Updated•5 years ago
|
Comment 27•5 years ago
|
||
Comment 28•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d8c73b98530c
Include TelemetryStartup in package manifest so that telemetry reporting works in packaged builds. r=mkmelin
Comment 29•5 years ago
|
||
Looks like this patch is causing lots of telemetry test failures. Well, that was unexpected! E.g. https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306623142&repo=comm-central&lineNumber=2254
I've backed it out for now: https://hg.mozilla.org/comm-central/rev/1266261951c7599b81738f7855968a0edda9e91a
Updated•5 years ago
|
Comment 30•5 years ago
|
||
I can't figure out why this one line change breaks tests. Seems all failing tests are keyed scalar probes, normal scalar and histogram tests passed. But I don't know how to explain that.
A Try run link: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=aaa7b53b8ecc74f69d5c33e8575cbb4f51c9793a
Comment 31•5 years ago
|
||
Possibly they need release_channel_collection: opt-out in the definition.
I tried that with one - https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=f76b207996b7f4a9a706e78bd1853aa923caefa2&selectedTaskRun=PW9x-_LiT-eUuDwY9ruxDA.0 - and that doesn't show a problem for the probe I changed (different from the one you have in comment 30)
Sent off another try run with more (all) of them changed now: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=91097a54deb8f43fb3889ef9af017a5453ee6b14
Comment 32•5 years ago
|
||
That seems to have done the trick, but bug 1646724 is still there.
Comment 33•5 years ago
|
||
I'll go ahead and land that change so we can start getting telemetry data. If bug 1646724 is persistent we need to check that and possibly disable it.
Comment 34•5 years ago
|
||
Awesome, I didn't notice release_channel_collection at all. Will see if I can find anything about bug 1646724.
Comment 35•5 years ago
|
||
Comment 36•5 years ago
|
||
Looks like the same treatment worked for that one - all green try at https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&selectedTaskRun=ZyhgVeZGR-C1_cnxZyh9_Q.0&revision=1699598e9d5ed5a0a9b6b3d909e02927cb987108
Comment 37•5 years ago
|
||
Comment 38•5 years ago
|
||
Update server url according to comment 13.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 39•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c208d61f7cc6
Update telemetry server pref to production url. r=mkmelin
Comment 40•5 years ago
|
||
Flags so we don't forget to uplift.
Also, do we need 1597180-package-telemetry.patch on esr78 ?
Comment 41•5 years ago
|
||
Updated•5 years ago
|
Comment 42•5 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #40)
Also, do we need 1597180-package-telemetry.patch on esr78 ?
I marked it as obsolete just now, it was replaced by the commits in comment 35, 37. I just checked, they have already been pushed to comm-beta.
https://hg.mozilla.org/releases/comm-beta/rev/3bff18148f7b67b4f6d14773697a47ac4d12ab16
(In reply to Wayne Mery (:wsmwk) from comment #41)
1597180-server-url.patch
This is in comm-beta as well.
https://hg.mozilla.org/releases/comm-beta/rev/c208d61f7cc688d2ad79e864d77e91392b8d0b8d
Updated•5 years ago
|
Comment 43•5 years ago
|
||
Ryan, let me know when the website is up.
Comment 44•5 years ago
•
|
||
It should go up here: https://www.mozilla.org/privacy/thunderbird/
Hopefully as early as today, but it is still in a final review. I will update this bug as soon as it is live.
Comment 45•5 years ago
|
||
I don't think it's going to be up today, there's still some discussion about some bits related to Gandi and the use of the term "Mozilla".
Comment 46•5 years ago
|
||
Comment on attachment 9158097 [details] [diff] [review]
1597180-server-url.patch
[Triage Comment]
Approved for esr78
Comment 47•5 years ago
•
|
||
The changes mentioned in comments 35 and 37 would have gone into 79beta, and are not present on 78esr. Do those need to be taken as well? Then if that's the case there is a merge conflict because beta has diverged quite a bit from what's on esr78 somehow.
Comment 48•5 years ago
|
||
We need all the changesets yes. But I would wait and add this to 78.3 instead, along with bug 1651298.
Comment 49•5 years ago
|
||
Is the intention to have telemetry on 78 collect everything that's on beta right now? The Scalars.yaml files have diverged enough that my last uplift attempt ran into some merge issues with that file. It looks like we need to uplift bug 1641773 (79) and bug 1644311 (79) in addition to this one in order to fix that. (requested)
Plus these from this bug (for uplifter reference):
https://hg.mozilla.org/comm-central/rev/3bff18148f7b
https://hg.mozilla.org/comm-central/rev/850f82431c23
https://hg.mozilla.org/comm-central/rev/c208d61f7cc6
Comment 50•5 years ago
|
||
Yes, we want all the probes we've created.
Comment 51•5 years ago
|
||
| bugherder uplift | ||
Description
•