diff --git a/sdks/python/apache_beam/runners/common.py b/sdks/python/apache_beam/runners/common.py index 8a4f26c18e88..14aff44e6be0 100644 --- a/sdks/python/apache_beam/runners/common.py +++ b/sdks/python/apache_beam/runners/common.py @@ -1608,7 +1608,7 @@ def _reraise_augmented(self, exn, windowed_value=None): _, _, tb = exc_info new_exn = new_exn.with_traceback(tb) - self._maybe_sample_exception(exc_info, windowed_value) + self._maybe_sample_exception(new_exn, windowed_value) _LOGGER.exception(new_exn) raise new_exn