Skip to content

Commit 5957e6f

Browse files
authored
[CI] capture checkers output in OTEL (#46601)
capture output
1 parent 2d68208 commit 5957e6f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎utils/checkers.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __enter__(self):
8888
def __exit__(self, *exc):
8989
return False
9090

91-
def set_exit_code(self, returncode):
91+
def set_exit_code(self, returncode, **kwargs):
9292
pass
9393

9494

@@ -609,7 +609,7 @@ def main():
609609
rc, output = run_checker(name, fix=args.fix, line_callback=window.add_line)
610610
elapsed = time.perf_counter() - checker_start
611611
window.finish(success=(rc == 0), elapsed=elapsed, show_lines=(rc == 0))
612-
otel_step.set_exit_code(rc)
612+
otel_step.set_exit_code(rc, command=cmd_str, output=output)
613613
if rc != 0:
614614
print()
615615
_print_output(output)
@@ -654,7 +654,7 @@ def print_line(line):
654654
status = "OK" if rc == 0 else "FAILED"
655655
print(f"{status} ({format_elapsed(elapsed)})", flush=True)
656656
print(flush=True)
657-
otel_step.set_exit_code(rc)
657+
otel_step.set_exit_code(rc, command=cmd_str, output=output)
658658
if rc == 0 and cache is not None:
659659
cache.update(name)
660660
elif rc != 0:

0 commit comments

Comments
 (0)