Version: spring-cloud-sleuth-core-2.2.2.RELEASE.jar
Actually MessageListenerContainer creation is intercepted thanks to a pointcut defined in SleuthKafkaAspect on method KafkaListenerContainerFactory.createListenerContainer:
@Pointcut("execution(public * org.springframework.kafka.config.KafkaListenerContainerFactory.createListenerContainer(..))")
private void anyCreateListenerContainer() {
}
but from the reference documentation (link):
Starting with version 2.2, you can use the same factory to create any ConcurrentMessageListenerContainer
KafkaListenerContainerFactory exposes other factory methods:
// intercepted
C createListenerContainer(KafkaListenerEndpoint endpoint);
// not intercepted
C createContainer(TopicPartitionOffset... topicPartitions);
C createContainer(String... topics);
C createContainer(Pattern topicPattern);
Can you add pointcuts also on createContainer(..) methods with the same tracing logic?