The spirit of this change is reverting #23153. Since that time, we have moved tracing and `artifactsDir` lifetime into the test runner, so the reason for revert is mitigated. Fixes #30287, fixes #30718, fixes #30959.