-
Notifications
You must be signed in to change notification settings - Fork 1.6k
GH-3049: Listener exceptions are not saved to the observation. #3080
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
Conversation
Unit text |
...ng-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java
Outdated
Show resolved
Hide resolved
...ng-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java
Outdated
Show resolved
Hide resolved
KafkaTemplate<Integer, String> errorTemplate(ProducerFactory<Integer, String> pf) { | ||
KafkaTemplate<Integer, String> template = new KafkaTemplate<>(pf); | ||
template.setObservationEnabled(true); | ||
return template; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like both of these new KafkaTemplate
beans are just exactly the same what is template
bean.
Any particular reason why do we need these two?
Why that template
is not enough for new tests?
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for test tag spring.kafka.template.name
, is doesn't matter.
Is ok to unify the runtimeExceptionTemplate
and errorTemplate
into a throwableTemplate
?
* Embedded the (original) exception into the observation, allowing downstream tracing code to handle it. * Add unit test for observation Error and RuntimeException.
Resolves #3049