Commit 824ef5f3 authored by Michael Droettboom's avatar Michael Droettboom Committed by Alessio Placitelli
Browse files

Address comments in the PR.

parent 01c37f2e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@ Each ping has the following parameters:
- `include_client_id` (required): A boolean indicating whether to include the
  `client_id` in the [`client_info` section](pings.md#The-client_info-section)).

For example, to define a custom ping specifically for search information:
For example, to define a custom ping called `search` specifically for search
information:

```YAML
search:
@@ -29,7 +30,9 @@ To send a metric on a custom ping, you add the custom ping's name to
the `send_in_pings` parameter in the `metrics.yaml` file.

For example, to define a new metric to record the default search engine, which
is sent in a custom ping called `search`:
is sent in a custom ping called `search`, put `search` in the `send_in_pings`
parameter.  Note that it is an error to specify a ping in `send_in_pings` that
does not also have an entry

```YAML
search.default:
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ import groovy.json.JsonOutput
// so that it will be shared between all libraries that use glean.  This is
// important because it is approximately 300MB in installed size.

String GLEAN_PARSER_VERSION = "0.23.2"
String GLEAN_PARSER_VERSION = "0.24.0"
// The version of Miniconda is explicitly specified.
// Miniconda3-4.5.12 is known to not work on Windows.
String MINICONDA_VERSION = "4.5.11"
+8 −7
Original line number Diff line number Diff line
@@ -335,13 +335,14 @@ open class GleanInternalAPI internal constructor () {
    /**
     * Send a list of pings.
     *
     * While the collection of metrics into pings happens synchronously, the
     * ping queuing and ping uploading happens asyncronously.
     * There are no guarantees that this will happen immediately.
     * The ping content is assembled as soon as possible, but upload is not
     * guaranteed to happen immediately, as that depends on the upload
     * policies.
     *
     * If the ping currently contains no content, it will not be sent.
     *
     * @param pings List of pings to send.
     * @return The async Job performing the work of assembling the ping
     */
    internal fun sendPings(pings: List<PingType>) = Dispatchers.API.launch {
        if (!isInitialized()) {
@@ -377,14 +378,14 @@ open class GleanInternalAPI internal constructor () {
     * Each ping will be looked up in the known instances of [PingType]. If the
     * ping isn't known, an error is logged and the ping isn't queued for uploading.
     *
     * While the collection of metrics into pings happens synchronously, the
     * ping queuing and ping uploading happens asyncronously.
     * There are no guarantees that this will happen immediately.
     * The ping content is assembled as soon as possible, but upload is not
     * guaranteed to happen immediately, as that depends on the upload
     * policies.
     *
     * If the ping currently contains no content, it will not be sent.
     *
     * @param pingNames List of ping names to send.
     * @return true if any pings had content and were queued for uploading
     * @return The async Job performing the work of assembling the ping
     */
    internal fun sendPingsByName(pingNames: List<String>): Job? {
        val pings = pingNames.mapNotNull { pingName ->