You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a problem that with Spring Cloud Stream and Sleuth, grpc-client-spring-boot-starter is not reporting spans to Kafka.
The problem is first described here: spring-cloud/spring-cloud-sleuth#719 , after which I narrowed down the root cause to grpc-client-spring-boot-starter. The issue is that with GrpcClientAutoConfiguration configuration in place, it requires Tracer bean to be instantiated early before MessagingAnnotationPostProcessor in Spring Integration get a chance to post-process it, causing following polling method is not collecting spans and reporting it to messaging queue:
// in org.springframework.cloud.sleuth.stream.StreamSpanReporter
@InboundChannelAdapter(value = SleuthSource.OUTPUT, poller = @Poller(POLLER))
public Spans poll() {
...
}
In fact, it causes a number of beans being instantiated early. See following log printed by BeanPostProcessorChecker:
2017-10-01 20:20:58.745 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$a60515ef] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:58.789 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport' of type [org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$f94a22f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:58.948 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.annotation.SleuthAnnotationAutoConfiguration' of type [org.springframework.cloud.sleuth.annotation.SleuthAnnotationAutoConfiguration$$EnhancerBySpringCGLIB$$d4b84a9e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.365 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'sleuthAdvisorConfig' of type [org.springframework.cloud.sleuth.annotation.SleuthAdvisorConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.374 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$$EnhancerBySpringCGLIB$$e3d45cc0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.660 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.stream.config.SpelExpressionConverterConfiguration' of type [org.springframework.cloud.stream.config.SpelExpressionConverterConfiguration$$EnhancerBySpringCGLIB$$d28f5c61] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.681 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spelConverter' of type [org.springframework.cloud.stream.config.SpelExpressionConverterConfiguration$SpelConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.703 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'grpcChannelsProperties' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcChannelsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.716 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'grpcLoadBalancerFactory' of type [io.grpc.util.RoundRobinLoadBalancerFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.738 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$TraceClientAutoConfiguration' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$TraceClientAutoConfiguration$$EnhancerBySpringCGLIB$$3a8c93dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.765 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.sleuth-org.springframework.cloud.sleuth.autoconfig.SleuthProperties' of type [org.springframework.cloud.sleuth.autoconfig.SleuthProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.770 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.autoconfig.TraceAutoConfiguration' of type [org.springframework.cloud.sleuth.autoconfig.TraceAutoConfiguration$$EnhancerBySpringCGLIB$$b50217f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.809 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'defaultSpanAdjuster' of type [org.springframework.cloud.sleuth.NoOpSpanAdjuster] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.812 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.stream.SleuthStreamAutoConfiguration' of type [org.springframework.cloud.sleuth.stream.SleuthStreamAutoConfiguration$$EnhancerBySpringCGLIB$$aca7b1fe] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.836 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.sleuth.sampler-org.springframework.cloud.sleuth.sampler.SamplerProperties' of type [org.springframework.cloud.sleuth.sampler.SamplerProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.845 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'defaultTraceSampler' of type [org.springframework.cloud.sleuth.sampler.PercentageBasedSampler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.854 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'randomForSpanIds' of type [java.util.Random] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.901 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spanNamer' of type [org.springframework.cloud.sleuth.DefaultSpanNamer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.930 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.log.SleuthLogAutoConfiguration$Slf4jConfiguration' of type [org.springframework.cloud.sleuth.log.SleuthLogAutoConfiguration$Slf4jConfiguration$$EnhancerBySpringCGLIB$$58bb2b4d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:20:59.984 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.sleuth.log.slf4j-org.springframework.cloud.sleuth.log.SleuthSlf4jProperties' of type [org.springframework.cloud.sleuth.log.SleuthSlf4jProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.014 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'slf4jSpanLogger' of type [org.springframework.cloud.sleuth.log.Slf4jSpanLogger] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.050 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration' of type [org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration$$EnhancerBySpringCGLIB$$88a8803c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.098 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'serverProperties' of type [org.springframework.boot.autoconfigure.web.ServerProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.249 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.zipkin-org.springframework.cloud.sleuth.stream.ZipkinProperties' of type [org.springframework.cloud.sleuth.stream.ZipkinProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.267 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.commons.util.UtilAutoConfiguration' of type [org.springframework.cloud.commons.util.UtilAutoConfiguration$$EnhancerBySpringCGLIB$$9a00cdf0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.308 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'inetUtilsProperties' of type [org.springframework.cloud.commons.util.InetUtilsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.321 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'inetUtils' of type [org.springframework.cloud.commons.util.InetUtils] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.329 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.stream.SleuthStreamAutoConfiguration$DefaultEndpointLocatorConfiguration' of type [org.springframework.cloud.sleuth.stream.SleuthStreamAutoConfiguration$DefaultEndpointLocatorConfiguration$$EnhancerBySpringCGLIB$$7f66c510] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.346 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'zipkinEndpointLocator' of type [org.springframework.cloud.sleuth.stream.ServerPropertiesHostLocator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.355 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.metric.TraceMetricsAutoConfiguration$CounterServiceSpanReporterConfig' of type [org.springframework.cloud.sleuth.metric.TraceMetricsAutoConfiguration$CounterServiceSpanReporterConfig$$EnhancerBySpringCGLIB$$847edcbf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.376 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration$FastMetricServicesConfiguration' of type [org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration$FastMetricServicesConfiguration$$EnhancerBySpringCGLIB$$b9b668bb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.408 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'counterBuffers' of type [org.springframework.boot.actuate.metrics.buffer.CounterBuffers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.429 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'counterService' of type [org.springframework.boot.actuate.metrics.buffer.BufferCounterService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.438 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.metric.TraceMetricsAutoConfiguration' of type [org.springframework.cloud.sleuth.metric.TraceMetricsAutoConfiguration$$EnhancerBySpringCGLIB$$f8dd104d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.457 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'sleuthMetricProperties' of type [org.springframework.cloud.sleuth.metric.SleuthMetricProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.479 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spanReporterCounterService' of type [org.springframework.cloud.sleuth.metric.CounterServiceBasedSpanMetricReporter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.551 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'sleuthStreamSpanReporter' of type [org.springframework.cloud.sleuth.stream.StreamSpanReporter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.629 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.sleuth.keys-org.springframework.cloud.sleuth.TraceKeys' of type [org.springframework.cloud.sleuth.TraceKeys] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.658 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'sleuthTracer' of type [org.springframework.cloud.sleuth.trace.DefaultTracer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.706 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'globalTraceClientInterceptorConfigurerAdapter' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$TraceClientAutoConfiguration$1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.723 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'globalClientInterceptorRegistry' of type [net.devh.springboot.autoconfigure.grpc.client.GlobalClientInterceptorRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.751 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'addressChannelFactory' of type [net.devh.springboot.autoconfigure.grpc.client.AddressChannelFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.880 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [org.springframework.beans.factory.config.PropertiesFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:00.893 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [java.util.Properties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:01.060 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.stream.config.BindingServiceConfiguration$PostProcessorConfiguration' of type [org.springframework.cloud.stream.config.BindingServiceConfiguration$PostProcessorConfiguration$$EnhancerBySpringCGLIB$$941aa271] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:01.122 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration' of type [org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$$EnhancerBySpringCGLIB$$ba36b08b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-10-01 20:21:01.148 INFO [demo-cloud-sleuth,,,] 25806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.web.client.TraceWebClientAutoConfiguration$TraceOAuthConfiguration' of type [org.springframework.cloud.sleuth.instrument.web.client.TraceWebClientAutoConfiguration$TraceOAuthConfiguration$$EnhancerBySpringCGLIB$$174f96cb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
I found a problem that with Spring Cloud Stream and Sleuth, grpc-client-spring-boot-starter is not reporting spans to Kafka.
The problem is first described here: spring-cloud/spring-cloud-sleuth#719 , after which I narrowed down the root cause to grpc-client-spring-boot-starter. The issue is that with
GrpcClientAutoConfiguration
configuration in place, it requiresTracer
bean to be instantiated early beforeMessagingAnnotationPostProcessor
in Spring Integration get a chance to post-process it, causing following polling method is not collecting spans and reporting it to messaging queue:In fact, it causes a number of beans being instantiated early. See following log printed by BeanPostProcessorChecker:
There might be other potential issues regarding not being post-processed by BeanPostProcessors. This issue https://github.com/yidongnan/grpc-spring-boot-starter/issues/50 might be one of them,
I'll later try to provide a patch to fix the issue I encountered above.
The text was updated successfully, but these errors were encountered: