Open
Bug 1440089
Opened 8 years ago
Updated 3 years ago
implement TelemetryController.canUpload()
Categories
(Toolkit :: Telemetry, enhancement, P3)
Toolkit
Telemetry
Tracking
()
NEW
People
(Reporter: jhirsch, Unassigned)
Details
It would be nice to expose the state of the current upload pref via
TelemetryController.canUpload()
rather than the current approach,
Services.prefs.getBoolPref(TelemetryUtils.Preferences.FhrUploadEnabled, false)
(This API came up during discussion of bug 1280234.)
Comment 1•8 years ago
|
||
We could consider exposing that through:
- TelemetryController
- nsITelemetry
- ...?
Comment 2•8 years ago
|
||
Just a note that "Can we send Telemetry?" is a rather complex question.
There's the pref, as correctly noted. But also of note is that it's a different pref if we're not on Desktop[0].
There's the TelemetryReportingPolicy part to ensure the user's had a chance to be notified and take action[1].
Then there's the logic around whether we're physically able to send, in TelemetrySend[2].
And from there, the Scheduler will also be considering if it's the right time to send (or if we've sent too much too recently)[3]. But this is mostly just for "main" pings, so maybe it's not behaviour you hope to emulate.
My opinion is that a global "can we send Telemetry" indicator might be most useful when it takes into account the pref and the policy, but leaves sending and scheduling alone.
[0]: https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/internals/preferences.html
[1]: https://searchfox.org/mozilla-central/rev/9a8d3f8191b15cdca89a7ce044c7bea2dd0462dc/toolkit/components/telemetry/TelemetryReportingPolicy.jsm#338
[2]: https://searchfox.org/mozilla-central/rev/9a8d3f8191b15cdca89a7ce044c7bea2dd0462dc/toolkit/components/telemetry/TelemetrySend.jsm#1243
[3]: https://searchfox.org/mozilla-central/rev/9a8d3f8191b15cdca89a7ce044c7bea2dd0462dc/toolkit/components/telemetry/TelemetrySession.jsm#224
Comment 3•8 years ago
|
||
Talking through this in triage, we need to spend some cycles on design here.
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•