-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Original exception never gets logged in Retry Topic flow #2212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
Looks like Guess it's alright though - let me know if otherwise. I should open a PR for this shortly if that's ok. Thanks. |
It doesn't really make a difference; this is fine. |
tomazfernandes
added a commit
to tomazfernandes/spring-kafka
that referenced
this issue
Apr 5, 2022
Resolves spring-projects#2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred.
tomazfernandes
added a commit
to tomazfernandes/spring-kafka
that referenced
this issue
Apr 5, 2022
Resolves spring-projects#2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred.
tomazfernandes
added a commit
to tomazfernandes/spring-kafka
that referenced
this issue
Apr 6, 2022
Resolves spring-projects#2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred.
tomazfernandes
added a commit
to tomazfernandes/spring-kafka
that referenced
this issue
Apr 6, 2022
Resolves spring-projects#2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred.
garyrussell
pushed a commit
that referenced
this issue
Apr 11, 2022
* GH-2212: Log listener ex. in retry topic flow Resolves #2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred. * Address TimestampedException review suggestions Add ListenerExceptionLoggingStrategy Add unit tests * Address review comments
garyrussell
pushed a commit
that referenced
this issue
Apr 11, 2022
* GH-2212: Log listener ex. in retry topic flow Resolves #2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred. * Address TimestampedException review suggestions Add ListenerExceptionLoggingStrategy Add unit tests * Address review comments
garyrussell
pushed a commit
that referenced
this issue
Apr 11, 2022
* GH-2212: Log listener ex. in retry topic flow Resolves #2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred. * Address TimestampedException review suggestions Add ListenerExceptionLoggingStrategy Add unit tests * Address review comments
garyrussell
pushed a commit
that referenced
this issue
Apr 11, 2022
* GH-2212: Log listener ex. in retry topic flow Resolves #2212 As in Retry Topic flow recovery is successful, the exception thrown by the listener was never being logged. Now it logs at DEBUG level for intermediate retries and ERROR level when retries are exhausted. Also some polishing in TimestampedException as it was cluttering the stacktrace with duplicated information from cause.getMessage(). Now it logs the time when the exception occurred. * Address TimestampedException review suggestions Add ListenerExceptionLoggingStrategy Add unit tests * Address review comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This SO user pointed out that, when the record goes through the Retry Topic flow, the original exception never gets logged.
We had already discussed this a bit earlier this year.
@garyrussell proposed:
I suggested as an alternative:
The main difference seems to be whether we want to log the exception at every retry attempt or only before it goes to the DLT.
We might look into adding both and making these configurable - users might be able to set a flag in
DLPR
to log after every attempt, andDLPRF
to log before going to the DLT.We could also have this as an enum in
DLPRF
, with something likeOriginalExceptionLoggingStrategy.NEVER
,EVERY_ATTEMPT
,AFTER_RETRIES_EXHAUSTED
-DLPRF
would then set the appropriate flag inDLPR
.WDYT?
Originally posted by @tomazfernandes in #2211
The text was updated successfully, but these errors were encountered: