Bug 1894154 - Enable telemetry in CI r=firefox-build-system-reviewers,glandium

Also collect boolean flag `moz_automation` to allow filtering between
CI/Automation telemetry and the rest.

Differential Revision: https://phabricator.services.mozilla.com/D209272
This commit is contained in:
ahochheiden 2024-07-09 19:57:45 +00:00
parent 2c6d42a758
commit 106baffe33
3 changed files with 18 additions and 3 deletions

View File

@ -417,9 +417,13 @@ def _finalize_telemetry_glean(telemetry, is_bootstrap, success):
get_vscode_running,
)
moz_automation = any(e in os.environ for e in ("MOZ_AUTOMATION", "TASK_ID"))
mach_metrics = telemetry.metrics(MACH_METRICS_PATH)
mach_metrics.mach.duration.stop()
mach_metrics.mach.success.set(success)
mach_metrics.mach.moz_automation.set(moz_automation)
system_metrics = mach_metrics.mach.system
cpu_brand = get_cpu_brand()
if cpu_brand:

View File

@ -91,9 +91,6 @@ def is_applicable_telemetry_environment():
# we don't want to collect telemetry again down here.
return False
if any(e in os.environ for e in ("MOZ_AUTOMATION", "TASK_ID")):
return False
return True

View File

@ -75,6 +75,20 @@ mach:
expires: never
send_in_pings:
- usage
moz_automation:
type: boolean
description: True if this command is being run on Mozilla Automation/CI
lifetime: application
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1894154
data_reviews:
- TBD
notification_emails:
- build-telemetry@mozilla.com
- ahochheiden@mozilla.com
expires: never
send_in_pings:
- usage
mach.system:
cpu_brand: