Closed ekneg54 closed 3 weeks ago
additional work:
Attention: Patch coverage is 91.03448%
with 26 lines
in your changes missing coverage. Please review.
Project coverage is 94.09%. Comparing base (
eca9240
) to head (1e150eb
). Report is 14 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This changes the error handling implementation of logprep. This PR aims at two main goals.
This is handled by not raising FatalOutputError or FatalInputError but instead raise a CriticalInputError or a CriticalOutputError. No error is handled in the pipeline process anymore all error causing events are written to error output. To achieve this, I had to change the batch_finished_callback mechanic. As now every event gotten from input via get_next is committed to kafka utilizing the batch_finished_callback mechanic in the pipeline.py. no connections between intput and output connectors anymore.
to make it simple. This PR has to ensure, that every event goes into output, error output or gets logged to console as last resort.
Every error raising event will be serialized together with its raising error to an error event and is put into a multiprocessing.Queue (ThrottlingQueue). In the main Thread these events were handled in a configured error output connector which indeed can be any output connector implemented in logprep.
To achieve theses goals I had to reimplement the opensearch output connector to simplify things a lot.
Please have a look on my changes and lets discuss. Feel free to give feedback and to ask your questions. It is a very big PR. Sorry for that but the cut was a fundamental one.