Files
tubestation/python/mach/pings.yaml
Mitchell Hentges 0d0819ffb2 Bug 1654074: Publish glean handle to mach commands r=firefox-build-system-reviewers,rstewart
Allows mach commands to define their own glean metrics with the `metrics_path` @CommandProvider parameter.
When `metrics_path` is defined:
* A `metrics` kwarg is provided to the decorated class. This `metrics` handle is a Glean instance, so Glean documentation should be consulted for usage information.
* When `mach doc telemetry` is run, metrics docs will be generated from all the registered metrics files.

Note: there was some consideration between making `metrics_path` a @CommandProvider or @Command parameter.
In the end, @CommandProvider seemed like a better fit because:
* Metrics seem to be more associated with the entire class than a specific command/method. This is because a class represents a "domain", and that domain may have different commands that have overlapping metrics.  Accordingly, all the metrics should be defined once as available to the entire class.
* Currently, @Command methods only take parameters that map one-to-one with CLI arguments. It could seem inconsistent to have one exception: the metrics handle

Differential Revision: https://phabricator.services.mozilla.com/D85953
2020-09-15 21:15:20 +00:00

23 lines
900 B
YAML

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# If this file is changed, update the generated docs:
# https://firefox-source-docs.mozilla.org/mach/telemetry.html#updating-generated-metrics-docs
---
$schema: moz://mozilla.org/schemas/glean/pings/1-0-0
usage:
description: >
Sent when the mach invocation is completed (regardless of result).
Contains information about the mach invocation that was made, its result,
and some details about the current environment and hardware.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1291053
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34
include_client_id: true
notification_emails:
- build-telemetry@mozilla.com
- mhentges@mozilla.com