From 47bb27db12bc17731dd71a58878f00c6653efd9e Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 23 May 2016 10:53:53 +0200 Subject: [PATCH] Updated docs for Kafka binder configuration Currently we need to explicitly define the headers for Kafka binder integration. Updated docs to refect that. fixes #282 --- .../main/asciidoc/spring-cloud-sleuth.adoc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc index dd344dea5..3f5ddd8d3 100644 --- a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc +++ b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc @@ -351,6 +351,30 @@ NOTE: the sample consumer application above explicitly excludes but this is optional (you might actually want to trace requests into the consumer app). +=== Spring Cloud Stream Kafka binder configuration + +In order to integrate header propagation with Spring Cloud Stream Kafka as a binder you have to provide in your +configuration file the following headers: + +[source,yaml] +---- +spring: + cloud: + stream: + kafka: + binder: + headers: + - X-B3-TraceId + - X-B3-SpanId + - X-B3-Sampled + - X-B3-ParentSpanId + - X-Span-Name + - X-Process-Id +---- + +TIP: If you have a custom `SpanExtractor` where you pass custom headers you need to provide those too in the +configuration file. + == Metrics Currently Spring Cloud Sleuth registers very simple metrics related to spans.