-
Notifications
You must be signed in to change notification settings - Fork 64
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
Porting Spring Sleuth implementation of @KafkaListener
support
#83
Conversation
@@ -26,7 +26,6 @@ | |||
|
|||
@KafkaListener(topics = "spring") | |||
public void listen(String message) { | |||
// TODO: no active span | |||
System.out.println("active span: " + tracer.activeSpan()); |
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.
@orange-buffalo could you add a check that active span is not null here anymore?
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.
Sure, added an assertion.
*/ | ||
package io.opentracing.contrib.kafka.spring; | ||
|
||
import io.opentracing.*; |
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.
please don't use .*
in imports
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.
Alright. It would be helpful for the contributors if project owners integrated a checkstyle or similar tool into the build, if some code convention rules are important to them.
import org.springframework.kafka.core.DefaultKafkaProducerFactory; | ||
import org.springframework.kafka.core.KafkaTemplate; | ||
import org.springframework.kafka.core.ProducerFactory; | ||
import org.springframework.kafka.core.*; |
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.
please don't use .*
in imports
} | ||
|
||
@Pointcut("execution(public * org.springframework.kafka.config.KafkaListenerContainerFactory.createListenerContainer(..))") | ||
private void anyCreateListenerContainer() { |
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.
why we need it if it doesn't do anything?
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.
Not sure what you mean, it is used by @Around
aspect. Defining a pointcut is a canonical Spring AOP way to introduce aspects.
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.
got it
Pull Request Test Coverage Report for Build 250
💛 - Coveralls |
…kaListener` support
A fix for #26.