rohdesamuel commented on code in PR #27280:
URL: https://github.com/apache/beam/pull/27280#discussion_r1245560305
##########
sdks/python/apache_beam/runners/common.py:
##########
@@ -1417,9 +1422,26 @@ def process(self, windowed_value):
try:
return self.do_fn_invoker.invoke_process(windowed_value)
except BaseException as exn:
+ self._maybe_sample_exception(exn, windowed_value)
self._reraise_augmented(exn)
return []
+ def _maybe_sample_exception(
+ self, exn: BaseException, windowed_value: Any) -> None:
+
+ if self.execution_context is None:
+ return
+
+ exception_sampler = self.execution_context.exception_sampler
+ if exception_sampler is None:
+ return
+
+ exception_sampler.sample_exception(
+ windowed_value,
+ exn,
Review Comment:
TODO: Get the exception with stacktrace
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]