TelemetrySend may at any time be notified it can upload. This includes before
when setup() is called. Since setup will attempt to upload when it runs, we can
safely ignore a too-early notify.
MozReview-Commit-ID: 9aeYitCpcIJ
TelemetrySend may at any time be notified it can upload. This includes before
when setup() is called. Since setup will attempt to upload when it runs, we can
safely ignore a too-early notify.
MozReview-Commit-ID: 9aeYitCpcIJ
This adds an attribute 'noShell' to nsIProcess that is used to launch a process
using CreateProcess() if we are sure we are launching an executable and don't
require the extra work of the Windows shell service.
MozReview-Commit-ID: 7p0iHCZK1uX
Once networking starts tearing down, our attempts to use XHR to send pings
will fail. This might contibute to high intermittent send failures reported
in the wild. So let's not even try.
But, let's be sure to mention when we decide not to try so we can ensure the
numbers line up before and after.
MozReview-Commit-ID: 71QGM7Xk5oc
This patch uses the functionality introduced in bug 1366711 to launch the
pingsender without showing its console window nor a mouse throbber. This also
reverts the pingsender into a console application.
MozReview-Commit-ID: BTcqAkR9UKB
It schedules the ping to be sent on new profiles after 30 minutes
from the Firefox startup. The ping is eventually sent at shutdown
if the scheduled time wasn't reached.
To reliably prevent sending the ping more than once, the "session-state.json"
file is used to keep track of the "sent" state.
The "new-profile" ping is protected behind a pref, disabled by default
in this patch.
MozReview-Commit-ID: 4g4lPRXe9q6
Roughly one in three telemetry sends fail according to telemetry.mozilla.org.
Unfortunately, we have little idea about why.
This patch logs the failure paths in an effort to identify the worst offenders.
This is a temporary measure not meant to survive for long.
The data it gathers will be used to write appropriate longer-term error probes.
MozReview-Commit-ID: 9IMrLNH2AD
When sending the shutdown ping we launched the pingsender executable via
PR_CreateProcessDetached() which on both Linux and MacOS X would fork()
gecko's main process and then exec() the pingsender executable. On MacOS X
this seemed to trigger a race with the mozalloc shutdown procedure within the
forked process. This patch changes the telemetry logic to use nsIProcess
instead which relies on posix_spawnp() to launch the new executable making it
immune to issues related to mozalloc's shutdown.
Since we don't need C++ code anymore to run the pingsender the runPingSender()
method is also moved to TelemtrySend.
MozReview-Commit-ID: C7fZw1ZpVBO
The crashreporter client will send a crash ping autonomously only when it
finds a valid TelemetryServerUrl annotation. This patch makes this annotation
conditional on all the preferences that regulate sending pings (including
official telemetry flags) and prevents it from sending pings before the user
has been notified of the privacy policy.
This is achieved by adding a new _annotateCrashReport() method to the
TelemetrySend obejct which can be called before we've initialized the rest of
the components. It is invoked manually early in the startup process so that
startup crashes are properly annotated, then it's invoked again when the user
is informed of the privacy policy as well as when one of the relevant
preferences is altered. This ensures that the annotations are stripped if the
user disables uploading pings without having to restart Firefox.
MozReview-Commit-ID: 2DKnoWGT1Bp