Reputation: 6472
I have the following setup :
spring-cloud-starter-zipkin
and spring-cloud-stream-binder-kafka
dependencies.openzipkin/zipkin:2.8
docker imageTraceChannelInterceptor
indicating that the instrumentation is taking placeThere used to be a StreamEnvironmentPostProcessor
that did the job of adding the trace headers to the kafka bindings when I included the spring-cloud-sleuth-stream
dependendy in the past. But the doc clearly states now :
Note: spring-cloud-sleuth-stream is deprecated and incompatible with these destinations
What should I do to make this work properly now ? Add the headers to the bindings configuration myself ? Or is there something I'm missing ?
Upvotes: 1
Views: 871
Reputation: 11189
That was a bug in Spring Cloud Sleuth in Edgware. The Stream Kafka Binder in Edgware required explicit passing of headers that should get propagated. The side effect of adding sleuth-stream
on the classpath was exactly that feature. By fixing the https://github.com/spring-cloud/spring-cloud-sleuth/issues/1005 issue we're adding back the missing feature to core. This is not ported to Finchley since Stream Kafka Binder in Finchley passes all headers by default.
The workaround for Edgware is to pass a list of headers in the following manner:
spring:
cloud:
stream:
kafka:
binder:
headers:
- spanId
- spanSampled
- spanProcessId
- spanParentSpanId
- spanTraceId
- spanName
- messageSent
Upvotes: 1