beam icon indicating copy to clipboard operation
beam copied to clipboard

Stack Trace Decoration for Beam Samza Runner

Open Sanil15 opened this issue 2 years ago • 2 comments

Feature:

  1. Added support for displaying the full tranform name with any stack-trace for Samza Runner
  2. Added support for decorating stack traces with additional debugging information by adding a SamzaExceptionListener via the observer pattern

Example: Full transform name will be displayed with stack-trace on any exception thrown at runtime for ex


2022-08-02 11:45:30 ERROR [OpAdapter] [Samza StreamProcessor Container Thread-0] Op My Custom Operator/ParMultiDo(Anonymous) threw an exception during processing
java.lang.RuntimeException: org.apache.beam.sdk.util.UserCodeException: java.lang.RuntimeException: My Custom Exception
	at org.apache.beam.runners.samza.metrics.DoFnRunnerWithMetrics.withMetrics(DoFnRunnerWithMetrics.java:96) ~[beam-runners-samza-200.30.0.5.jar:?]
	at org.apache.beam.runners.samza.metrics.DoFnRunnerWithMetrics.processElement(DoFnRunnerWithMetrics.java:53) ~[beam-runners-samza-200.30.0.5.jar:?]
	at org.apache.beam.runners.core.SimplePushbackSideInputDoFnRunner.processElementInReadyWindows(SimplePushbackSideInputDoFnRunner.java:79) ~[beam-runners-core-java-200.30.0.5.jar:?]
	at org.apache.beam.runners.samza.runtime.DoFnOp.processElement(DoFnOp.java:295) ~[beam-runners-samza-200.30.0.5.jar:?]
	at org.apache.beam.runners.samza.runtime.OpAdapter.apply(OpAdapter.java:94) ~[beam-runners-samza-200.30.0.5.jar:?]



Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Choose reviewer(s) and mention them in a comment (R: @username).
  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI.

Sanil15 avatar Sep 13 '22 22:09 Sanil15

R: @xinyuiscool @kw2542

Sanil15 avatar Sep 13 '22 22:09 Sanil15

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

github-actions[bot] avatar Sep 13 '22 22:09 github-actions[bot]

Run Java PreCommit

xinyuiscool avatar Sep 23 '22 19:09 xinyuiscool

Run Java PreCommit

xinyuiscool avatar Sep 26 '22 17:09 xinyuiscool