[Enhancement] Enhance Logging for Sink Error (java.lang.Exception: Sink Error) to Include More Context #23934
Labels
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Search before asking
Motivation
I created a Debezium PostgreSQL source connector, and when an entry in one of the tables exceeded 5MB, the source threw the following error with "flush failed." However, the error's cause is only displayed as "Sink Error," which doesn't provide sufficient context for troubleshooting. Although there is a preceding log indicating that the message size exceeds the maximum allowed size, the overall log lacks detailed information.
Currently, the log includes a generic message:
Caused by: java.lang.Exception: Sink Error
This message provides minimal context and does not help identify the root cause of the "Sink Error." More detailed logging would significantly improve the debugging process. Including information such as the size of the message that caused the failure, details about the associated producer or consumer, and the specific part of the sink process where the error occurred would be invaluable for faster and more effective troubleshooting.
Here is the complete stacktrace:
Solution
Enhance the Sink Error log to include additional information such as if the error is related to specific conditions like exceeding message size or connection issues, mention that directly in the log message. For example, if the failure was caused by a connection timeout or message size violation, log it clearly.
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: