This patch the list of process and crash types that can be recorded in a keyed
histogram by the crash manager; the relevant pattern was updated to match
these kesy. A test was also added to ensure that no new crash types can be
added without also updating Histograms.json. This also fixes a related
existing test.
MozReview-Commit-ID: FKUZHd17a3V
Changes:
1. The change in telemetry.js avoids an issue with overwriting pending properties.
2. The test in telemetry.md has been updated now that we have a working test.
3. Added the actual toolbox.close telemetry event and test.
MozReview-Commit-ID: 9fOCkwCCwDx
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
Before we were falling back to using the raw version, which isn't
correct on at least beta (i.e. we would get `60.0` instead of `60.0b1`).
MozReview-Commit-ID: 7NfV6iRoj4y
As requested, a test for the key limit pref.
This sets it to a value lower than the limit of events we can currently send
without truncation (100), but higher than is likely to be hit by tests (since
the first time we record an event, we read the pref, so we can't unsend it).
MozReview-Commit-ID: 7pGftCa1rz3
To test the TelemetryEvents portion of the code we need TelemetryEvents
tests. (The gtests only cover portions deeper than the TelemetryScalar API).
MozReview-Commit-ID: ExaiW0OiwFI
Introducing the pref toolkit.telemetry.maxEventSummaryKeys which we should
hopefully never have to think about because (and yes, I risk being quoted in
future for this):
500 unique event names per process ought to be enough.
We check the preference just once but have to set it each time as the
KeyedScalar object may have been recreated while we weren't looking.
MozReview-Commit-ID: 8IE9dcfuynh
I considered a few different ways to do this, but storing the limit inside the
KeyedScalar itself was the cleanest. The limit check is too deep to pass it as
an argument, and making it conditional on the keyed scalar being called
"telemetry.event_counts" was too fragile.
MozReview-Commit-ID: AyfEKB40Abb
Telemetry Events will now be counted in the keyed scalar
"telemetry.event_counts" even if their category is not enabled for recording.
The keys will be category#method#object and a follow-up commit will expand the
process limit of the number of these from 100 to 500, configurable by pref.
Unfortunately Event Telemetry needs a special API so that an event recorded in
multiple processes will be summarized to those processes separately.
MozReview-Commit-ID: 7dKcM3SXO6r