Closed gdong42 closed 6 years ago
Without a sample to reproduce this problem it's going to be hard to help you. As a precaution, what I did is I've added AutoConfigureAfter
the Spring Integration autoconfiguration. Hope it helps
I suspect it is the same issue with https://github.com/spring-cloud/spring-cloud-netflix/issues/912
Why is this closed? The problem is still there. I'll try if I can extract things into a sample.
I wrote why I closed it. If you say it's still there then I'll reopen it and wait for the sample
@marcingrzejszczak I tracked down the root cause - it was due to a thirdparty dependency. In its @Bean
definition, it requires a bean dependency of Tracer
, in order to add tracing ability, which causes sleuthTracer
(and its dependencies including sleuthStreamSpanReporter
) being early instantiated.
I'll open issue in that thirdparty project. Thanks for your help!
Regards
Glad that you tracked it down! Which dependency is it BTW?
@marcingrzejszczak above referencing one. It's a gRPC and Spring Boot integration starter.
The code snippet is here:
I got the same problem. StreamSpanReporter.poll() is never called. This is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.13.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Edgware.SR3</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Here is my sample https://github.com/leewill1120/demo.git
How am I supposed to test your sample? You've provided a single app that calls another app that doesn't exist. Also can you check if the problem is still there when using sleuth snapshots. We fixed an issue related to proxies with this issue - https://github.com/spring-cloud/spring-cloud-sleuth/issues/932 .
I tried again with snapshot(1.3.4.BUILD-SNAPSHOT), It works! Thank you.
Hi team,
I encountered a wired situation that my project is not able to send spans over Spring Cloud Stream to Kafka. After investigation for a while, I found that it was due to bean
sleuthStreamSpanReporter
somehow was not getting post-processed byMessagingAnnotationPostProcessor
, which in turn causes following method not getting polled at all:thus the spans have no chance to be collected and send to kafka via stream. The other project using same dependencies runs fine. I noticed that the problematic one initializes
sleuthStreamSpanReporter
bean beforeMessagingAnnotationPostProcessor
is getting initialized. It also prints following info:I guess this might be relevant. However, I could not locate the root cause why this happens. Can you please help me and give some insights.
Thank you.
This is my dependencies: