Fixed issues with telemetry.

This commit is contained in:
2026-09-08 22:46:20 +02:00
parent 9b0abf6223
commit 1a120bbf86
7 changed files with 300 additions and 52 deletions

View File

@@ -110,6 +110,7 @@ class CommandRunner:
output_line_filter: OutputLineFilter | None = None,
pass_fds: Sequence[int] = (),
telemetry_stage: str | None = None,
report_failure_telemetry: bool = True,
) -> CommandOutcome:
arguments = [str(value) for value in argv]
if not arguments:
@@ -179,7 +180,9 @@ class CommandRunner:
dry_run=False,
)
self._record(outcome, cwd, overrides)
if outcome.timed_out or outcome.returncode != 0:
if report_failure_telemetry and (
outcome.timed_out or outcome.returncode != 0
):
telemetry = current_telemetry()
if telemetry is not None:
telemetry.report_subprocess_failure(