forked from mirrors/gecko-dev
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
4.8 KiB
4.8 KiB
Metrics
This document enumerates the metrics collected by this project. This project may depend on other projects which also collect metrics. This means you might have to go searching through the dependency tree to get a full picture of everything collected by this project.
Pings
usage
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.
This ping includes the client id.
Data reviews for this ping:
Bugs related to this ping:
The following metrics are added to the ping:
| Name | Type | Description | Data reviews | Extras | Expiration | Data Sensitivity |
|---|---|---|---|---|---|---|
| mach.argv | string_list | Parameters provided to mach. Absolute paths are sanitized to be relative to one of a few key base paths, such as the "$topsrcdir", "$topobjdir", or "$HOME". For example: "/home/mozilla/dev/firefox/python/mozbuild" would be replaced with "$topsrcdir/python/mozbuild". If a valid replacement base path cannot be found, the path is replaced with "". | 1 | never | ||
| mach.command | string | The name of the mach command that was invoked, such as "build", "doc", or "try". | 1 | never | ||
| mach.duration | timespan | How long it took for the command to complete. | 1 | never | ||
| mach.success | boolean | True if the mach invocation succeeded. | 1 | never | ||
| mach.system.cpu_brand | string | CPU brand string from CPUID. | 1 | never | ||
| mach.system.logical_cores | counter | Number of logical CPU cores present. | 1 | never | ||
| mach.system.memory | memory_distribution | Amount of system memory. | 1 | never | ||
| mach.system.physical_cores | counter | Number of physical CPU cores present. | 1 | never | ||
| mozbuild.artifact | boolean | True if --enable-artifact-builds. |
1 | never | ||
| mozbuild.ccache | boolean | True if --with-ccache. |
1 | never | ||
| mozbuild.clobber | boolean | True if the build was a clobber/full build. | 1 | never | ||
| mozbuild.compiler | string | The compiler type in use (CC_TYPE), such as "clang" or "gcc". | 1 | never | ||
| mozbuild.debug | boolean | True if --enable-debug. |
1 | never | ||
| mozbuild.icecream | boolean | True if icecream in use. | 1 | never | ||
| mozbuild.opt | boolean | True if --enable-optimize. |
1 | never | ||
| mozbuild.sccache | boolean | True if ccache in use is sccache. | 1 | never |
Data categories are defined here.