Commit Graph

26 Commits

Author SHA1 Message Date
Michael Kelly
3f9aa5d851 Bug 1470505: Disable browser error collection for webextension errors. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D1792
2018-07-09 18:27:22 +00:00
Michael Kelly
8770d2baa6 Bug 1451702: Mangle file: and jar: paths in browser error reports. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D1868
2018-06-28 11:19:24 -07:00
shindli
672e33f2d3 Backed out changeset 28564cd34c70 (bug 1451702) for bc failures in browser/modules/test/browser/browser_BrowserErrorReporter_nightly.js on a CLOSED TREE 2018-06-27 03:42:26 +03:00
Michael Kelly
26048fcbb5 Bug 1451702: Mangle file: and jar: paths in browser error reports. 2018-05-18 15:34:11 -07:00
Michael Kelly
1a8ea75eb8 Bug 1461439: Enable browser error telemetry on non-Nightly channels. r=Gijs
MozReview-Commit-ID: GAwbFC49b8H
2018-06-05 11:15:54 -07:00
Michael Kelly
2389e0b5af Bug 1467929: Only collect browser JS errors from recent builds. r=Gijs
Telemetry data suggests between 13%-40% of errors being collected are from
builds older than a week. Since Nightly updates twice a day, errors from builds
that old don't reflect the current state of Nightly, so we can ignore them and
save some bandwidth.

A build is considered "recent" if the date encoded at the start of the
appBuildId (YYYYMMDD) is within 7 days of the current date. Since this is mostly
for preventing high load on the collection service, the check does not handle
problems with the local clock being inaccurate in order to simplify the
implementation.

MozReview-Commit-ID: BbCO4kaBprL
2018-06-12 21:49:58 -07:00
Kris Maglione
0847e8227e Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB
2018-05-25 17:02:29 -07:00
Michael Kelly
cbb2884d07 Bug 1464521: Process collected browser JS errors during idle. r=kmag
testFetchArguments and the add-on ID mangling tests already cover error
collection end-to-end, so no new tests are needed to cover testing the idle
callback.

MozReview-Commit-ID: DJrqT5jCq44
2018-06-05 08:58:45 -07:00
Michael Kelly
9b417d4bb4 Bug 1450156: Do not wipe out tags in request template. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D834

MozReview-Commit-ID: 7WWtyz4PakT
2018-04-03 09:54:02 -07:00
Michael Kelly
f2ab2c2f3e Bug 1450153: Count extension errors separately in keyed scalar. r=Gijs
Also adds resource://devtools to the whitelist of reported paths for the
scalar.

Differential Revision: https://phabricator.services.mozilla.com/D831

MozReview-Commit-ID: BiAyoTQsWxx
2018-04-03 09:52:39 -07:00
Michael Kelly
01b85d576d Bug 1449367: Use 100% sample rate for devtools error reports. r=jryans
Differential Revision: https://phabricator.services.mozilla.com/D835

MozReview-Commit-ID: IgtFosj2mii
2018-04-02 13:22:45 -07:00
Michael Kelly
ed13131978 Bug 1449312: Include isExtensionError in all reports. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D820

MozReview-Commit-ID: 8b8JFWaCMHp
2018-03-29 11:11:23 -07:00
Michael Kelly
17d9fc8547 Bug 1448185: Use appBuildId as release for browser error reports. r=Gijs
Release is already included in the context as browser info and doesn't need to
be kept as a tag like appBuildId was.

Differential Revision: https://phabricator.services.mozilla.com/D807

MozReview-Commit-ID: IGzT3C3HSG
2018-03-27 13:03:49 -07:00
Michael Kelly
d9e8655d57 Bug 1444554: Add Telemetry scalars for BrowserErrorReporter.jsm. r=Gijs,chutten
Differential Revision: https://phabricator.services.mozilla.com/D725

MozReview-Commit-ID: KY90uSslMmb
2018-03-16 13:24:39 -07:00
Kris Maglione
3ea6a124d1 Backed out changeset 68e32f5b50e7 (bug 1444554) for failing its own test. r=backout
MozReview-Commit-ID: C6TooaguKcm
2018-03-20 20:31:57 -07:00
Michael Kelly
23a50381b4 Bug 1444554: Add Telemetry scalars for BrowserErrorReporter.jsm. r=Gijs,chutten
Differential Revision: https://phabricator.services.mozilla.com/D725

MozReview-Commit-ID: KY90uSslMmb
2018-03-16 13:24:39 -07:00
Michael Kelly
80e446a485 Bug 1445009: Tag errors from extensions with isExtensionError. r=Gijs
MozReview-Commit-ID: AQrlvTfJUUS
2018-03-19 13:40:53 -07:00
Michael Kelly
5e87786f0d Bug 1445009: Refactor BrowserErrorReporter.jsm and tests. r=Gijs
The transforms for turning an nsIScriptError into a payload that Sentry
understands were getting a bit complex for a single function, so they're
refactored into a list of transform functions that are applied in sequence to
produce the payload. This will make it easier to manage adding new transforms to
the list.

Refactoring this revaled a problem with the test code: it assumed that listeners
for console messages were notified in order of registration (since it used a
temporary listener to determine when the rest of the listeners had been notified
of a message). Changing the async evaluation of the code broke the tests, so
they had to be refactored as well.

Without a way to know when all console listeners have been notified, we can't
assert that a message will not be received by BrowserErrorReporter. We do two
things to get around this:

- Where possible, call `observe` directly on the reporter instance.
- Add constructor params for registering and unregistering listeners so we can
  test that logic without relying on messages being received or not.

MozReview-Commit-ID: EEH6IROOuHD
2018-03-19 12:41:30 -07:00
Cosmin Sabou
c988d1d4ae Backed out changeset a760e111f2f1 (bug 1444554) for merge conflicts on browser_BrowserErrorReporter.js and failures after merging to autoland. a=backout 2018-03-21 02:51:03 +02:00
Michael Kelly
b870e2c826 Bug 1444554: Add Telemetry scalars for BrowserErrorReporter.jsm. r=Gijs,chutten
Differential Revision: https://phabricator.services.mozilla.com/D725

MozReview-Commit-ID: KY90uSslMmb
2018-03-16 13:24:39 -07:00
Michael Kelly
e99d980747 Bug 1445012: Add user agent data to error report context. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D745

MozReview-Commit-ID: LKD0YwaYGUf
2018-03-19 13:59:10 -07:00
Michael Kelly
3dc515499d Bug 1441366 Use internal add-on IDs in browser error stacktrace reports. r=kmag
MozReview-Commit-ID: 7OC4utHLgXC
2018-02-26 16:12:08 -08:00
Michael Kelly
153a548648 Bug 1445011: Include sourceName in error report payload. r=Gijs
The module attribute for an exception is surfaced in Sentry as the "transaction"
tag, and is useful for errors that don't include stack traces.

Differential Revision: https://phabricator.services.mozilla.com/D727

MozReview-Commit-ID: JKwgmE2jBXB
2018-03-14 09:45:35 -07:00
Michael Kelly
9632c5bca4 Bug 1440534 Include source code in JS error reports. r=Gijs
Along with adding source code, this updates the reported to more closely follow
the Sentry SDK docs:

- Remove the "request" payload, which is for reporting errors related to HTTP
  requests.
- Include SDK info in the payload.
- Reverse the order of stack frames; they are meant to be ordered oldest to
  newest.
- Include a local UTC timestamp in the payload.
- Remove the in_app flag from stack traces, as it's not required or useful in
  the context of Firefox.

MozReview-Commit-ID: 558KrZNah6d

Differential Revision: https://phabricator.services.mozilla.com/D648
2018-02-27 11:08:38 -08:00
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
Michael Kelly
895bcde6ef Bug 1426482 Report browser errors in Nightly to Mozilla. r=gijs
Errors are collected via nsIConsoleService, shaped to a Sentry-compatible
format, and sent off. Reporting is on by default, and can be disabled using a
checkbox added to the privacy prefs in about:preferences.

Collected errors are sampled to avoid overloading the collection service; the
sample rate was determined by a previous Shield study that measured the number
of errors occurring in Nightly.

The feature is hard-disabled outside of Nightly and local builds, and the
preference is disabled by default in local builds. It is intended as a prototype
that will be evaluated and replaced by a more robust collection system if it
proves helpful.

Differential Revision: https://phabricator.services.mozilla.com/D561

MozReview-Commit-ID: 6aqUatXyuYs
2018-02-12 10:59:47 -08:00