brave
brave copied to clipboard
exception handling in kafka streams instrumentation
Currently all tracing variants of the stream components throw any exception encountered in the delegate upwards. If the tracing stream component is the top-level stream component (we can assume this will be the case a lot) then such exception likely kills the stream.
A pattern to avoid this is to wrap the Tracing stream component with another one and catch the exception there. Maybe there are better solutions (Stream.setUncaughtExceptionHandler
?) that can avoid this.