Commit Graph

87 Commits

Author SHA1 Message Date
Chris H-C
fa2c77a132 bug 1452139 - Don't include cookies when posting Telemetry r=gfritzsche,franziskus
We don't need or want cookies sent to incoming.tmo. It just throws them on the
floor, but we needn't waste clients' bandwidth on it.

MozReview-Commit-ID: F9WjcDyKFGN
2018-04-12 09:50:40 -04:00
akriti
73b92197c6 Bug 1442700 : Label added to TELEMETRY_SEND_FAILURE_TYPE and TelemetrySend's XHR_ERROR_TYPE for eTerminated , r=chutten
MozReview-Commit-ID: 5JnGdYynRKF
2018-03-28 15:27:51 +05:30
Florian Quèze
f1a55f73f8 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Chris H-C
e6f1f01d10 bug 1437120 - Ensure pings sent after net shutdown are persisted to disk r=Dexter
bug 1397293 introduced a mechanism by which we would bail out early in trying
to send a ping if we were trying to send it after the network had been torn
down.

Unfortunately, it did so indistinguishably from the case where we weren't
allowed to send pings, so we neglected to save the ping (as "pending") and
just archived it.

This change cleanly rejects the ping, and correctly tests that the rejected
ping is persisted, not just ephemerally hanging in memory for but a few moments
longer.

MozReview-Commit-ID: 2g8cpeBEzSE
2018-02-13 15:52:28 -05:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Mike Cooper
402ae54218 Bug 1434714 - Support Telemetry pings that are larger than 500,000 bytes after gzip r=gfritzsche
MozReview-Commit-ID: B1Bq5czcpdL
2018-01-31 13:05:21 -08:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Chris H-C
64d04edaac bug 1405299 - Do not attempt to upload pings if sending is not yet enabled r=Dexter
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
2017-10-11 16:22:14 -04:00
Sebastian Hengst
aeec385d57 Backed out changeset 506d96e0b240 (bug 1405299) 2017-10-12 15:29:12 +02:00
Chris H-C
0c16d09706 bug 1405299 - Do not attempt to upload pings if sending is not yet enabled r=Dexter
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
2017-10-11 16:22:14 -04:00
Cervantes Yu
27ff10717a Bug 1400294 - Add 'noShell' attribute to nsIProcess to use CreateProcess() for launching a process that doesn't require shell service on Windows. r=froydnj,r=aklotz,r=dmajor
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
2017-10-03 11:29:14 +08:00
Chris H-C
ba7e148275 bug 1397293 - Test TelemetrySend tooLateToSend r=Dexter
MozReview-Commit-ID: FmqQKEnU9L1
2017-09-26 14:53:15 -04:00
Chris H-C
dd61c8ae83 bug 1397293 - Don't try to send Telemetry after net shutdown r=Dexter
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
2017-09-22 12:28:06 -04:00
Andrea Marchesini
cd14912b8e Bug 1392358 - Introduce XHR.sendInputStream(nsIInputStream) chrome-only, r=smaug 2017-08-25 15:31:15 +02:00
Ryan VanderMeulen
547accb38c Bug 1389992 - Remove the os_shutting_down scalar and related code. r=dexter 2017-08-23 13:05:29 -04:00
Kate Ustiuzhanina
2883064fb0 Bug 1379145 - Use Policy in TelemetrySend.jsm to set up/reset custom timeout. r=gfritzsche 2017-08-07 17:51:07 +01:00
Kate Ustiuzhanina
a37d22b011 Bug 1375008 - Prioritize submission of Health ping. r=gfritzsche 2017-07-27 15:22:08 +01:00
Marco Castelluccio
743dd2e0c8 Bug 1357517 - Remove Preferences.jsm usage from some Telemetry files. r=Dexter 2017-07-31 01:32:31 +02:00
Kate Ustiuzhanina
3af03ea956 Bug 1318297 - Support initial implementation for Health ping. r=gfritzsche
Health ping is supposed to be a small ping for monitoring failures.
Current implementation tracks discarded for size and
send failures.
2017-07-25 16:19:31 +01:00
Carsten "Tomcat" Book
5089ce5b5c Backed out changeset 2ceb8a5a3e40 (bug 1318297) for xpcshell failures in test_TelemetryHealthPing.js 2017-07-24 16:16:40 +02:00
Kate Ustiuzhanina
17ad6746e6 Bug 1318297 - Support initial implementation for Health ping. r=gfritzsche
Health ping is supposed to be a small ping for monitoring failures.
Current implementation tracks discarded for size and
send failures.
2017-07-13 13:39:09 +01:00
Alejandro Rodriguez Salamanca
1d9a0b4bf3 Bug 1381843 - Use the prefs defined in TelemetryUtils.jsm in TelemetrySend.jsm. r=dexter 2017-07-19 02:12:00 +02:00
Vanessa Gutierrez
43f421e92a Bug 1376629 - Discard changes to npm-shrinkwrap.json and package.json. r=gfritzsche 2017-06-28 15:12:00 -04:00
Kate Ustiuzhanina
d9a5f7bf27 Bug 1367094 - Measure the size of successful and failed pings. r=gfritzsche
MozReview-Commit-ID: KSt07czm7Kt
2017-06-06 16:52:41 +01:00
Chris H-C
ed074fb3ef bug 1367110 - Collect Telemetry for different TelemetrySend failures r=bsmedberg,Dexter data-r=bsmedberg
Expires in 61 for now until we can show its usefulness.

MozReview-Commit-ID: IpfEnmnuKgr
2017-05-24 10:14:41 -04:00
Sebastian Hengst
1d7c0f09b9 Backed out changeset 244e7cfea731 (bug 1367110) 2017-05-31 21:02:07 +02:00
Chris H-C
1ba026146e bug 1367110 - Collect Telemetry for different TelemetrySend failures r=bsmedberg,Dexter data-r=bsmedberg
Expires in 61 for now until we can show its usefulness.

MozReview-Commit-ID: IpfEnmnuKgr
2017-05-24 10:14:41 -04:00
Gabriele Svelto
967217803e Bug 1364673 - Hide the mouse throbber when running the pingsender on Windows; r=Dexter
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
2017-05-29 15:28:36 +02:00
Chris H-C
4e05065abf Bug 1319026 - Remove logging for failed Telemetry send requests. r=gfritzsche
We have the data we need.

MozReview-Commit-ID: 8L24RSiu7Xd
2017-05-19 09:05:00 -04:00
Alessio Placitelli
4de8c1c162 Bug 1363345 - Don't use the pingsender when the OS is shutting down. r=bsmedberg,gfritzsche,data-review=bsmedberg
MozReview-Commit-ID: 9d8paU8M1T7
2017-05-12 12:23:07 +02:00
Sebastian Hengst
c36f0caacd Backed out changeset 30179c555174 (bug 1363345) for eslint failing at test_TelemetrySession.js:1421. r=backout 2017-05-22 20:07:13 +02:00
Alessio Placitelli
fd57e647e7 Bug 1363345 - Don't use the pingsender when the OS is shutting down. r=bsmedberg,gfritzsche,data-review=bsmedberg
MozReview-Commit-ID: 9d8paU8M1T7
2017-05-12 12:23:07 +02:00
Florian Quèze
50b8c6608d Bug 1353542 - script-generated patch to remove .bind(this) calls we no longer need now that generator functions have been replaced with async functions, r=Mossop. 2017-05-12 14:47:41 +02:00
Florian Quèze
ff53eb9a63 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Alessio Placitelli
6bc6b11ec3 Bug 1120370 - Implement the new-profile ping. r=bsmedberg,chutten, data-r=bsmedberg
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
2017-04-27 09:36:01 +02:00
Chris H-C
4b2149dbff bug 1319026 - Log failed Telemetry send requests. r=gfritzsche
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
2017-04-06 15:10:15 -04:00
Gabriele Svelto
b9cab3fec0 Bug 1356673 - Run the pingsender executable in a way that avoids shutdown races with mozalloc; r=Dexter
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
2017-04-25 01:07:36 +02:00
Alessio Placitelli
89df58ce52 Bug 1356673 - Fix a crash in RunPingSender at shutdown. r=gfritzsche
This patch makes sure to wait on the pingsender process to spawn
before shutting down Firefox.

MozReview-Commit-ID: CYYcGAy5H2s
2017-04-19 17:00:21 +02:00
Florian Queze
d3c36892fa Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
42670ceca0 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
9b4f73599f Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Alessio Placitelli
70c97fb2f2 Bug 1354482 - Turn on sending the "shutdown" ping using the pingsender from the second Firefox session. r=chutten,gfritzsche
MozReview-Commit-ID: IEYfziF86mF
2017-04-10 12:51:45 +02:00
Alessio Placitelli
d0dc520ab5 Bug 1336360 - Use the PingSender for sending pings when the browser shuts down. r=chutten,gsvelto
MozReview-Commit-ID: 6bNQs87UQ9m
2017-02-23 14:58:02 +01:00
Gabriele Svelto
4ff26d2d74 Bug 1341349 - Enable sending the crash ping from the crashreporter client only when the overall configuration would allow pings to be sent r=Dexter,gfritzsche
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
2017-03-08 15:00:26 +01:00
Deepa
8e003ca34a Bug 1344741 - Update TelemetrySend.jsm to async function & await. r=gfritzsche 2017-03-17 22:26:25 +05:30