Closed Bug 1513216 Opened 11 months ago Closed 10 months ago

Don't record build telemetry for `mach clang-format` when invoking it via hg


(Firefox Build System :: General, enhancement)

Not set


(Not tracked)



(Reporter: ted, Assigned: andi)


(Blocks 1 open bug)



(2 files)

clang-format currently shows up as the #1 most-used mach command:

Our intent is to only capture mach commands that are actually invoked by a user. We added some checks to deal with recursive mach invocations to keep those out of telemetry, but having `mach clang-format` get invoked from inside hg is adding a lot of noise here. We should figure out a sensible way to stop recording telemetry for this command in this situation.

Someone suggested that we ought to not record telemetry when we don't detect a terminal, but that would mean we wouldn't record telemetry when someone runs mach and pipes the output to a file. It might be simpler to just make the hg-formatsource extension set a magic environment variable. We don't have one for this purpose right now but we could add one here:
Assignee: nobody → bpostelnicu
I'm gonna take care of this, :ted I think your idea of having an env variable setup by the extension when it invokes 'mach clang-format' is the way to do it. It's easy to implement and straight forward.
Pushed by
Don't collect build telemetry when 'mach' is ran from hg format-source. r=sheehan
Pushed by
extensions: format-source should disable the 'mach' telemetry for the commands that it triggers. r=sheehan
Closed: 10 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.