Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2018-09-07 12:38:15 +00:00
parent cb46d0fb68
commit 2825ff05fa
4 changed files with 18 additions and 21 deletions

View File

@@ -1018,16 +1018,17 @@ The following example shows how to propagate <literal>x-vcap-request-id</literal
.build()
);</programlisting>
<simpara>Later, you can call the following code to affect the country code of the current trace context:</simpara>
<programlisting language="java" linenumbering="unnumbered">ExtraFieldPropagation.set("country-code", "FO");
String countryCode = ExtraFieldPropagation.get("country-code");</programlisting>
<programlisting language="java" linenumbering="unnumbered">ExtraFieldPropagation.set("x-country-code", "FO");
String countryCode = ExtraFieldPropagation.get("x-country-code");</programlisting>
<simpara>Alternatively, if you have a reference to a trace context, you can use it explicitly, as shown in the following example:</simpara>
<programlisting language="java" linenumbering="unnumbered">ExtraFieldPropagation.set(span.context(), "country-code", "FO");
String countryCode = ExtraFieldPropagation.get(span.context(), "country-code");</programlisting>
<programlisting language="java" linenumbering="unnumbered">ExtraFieldPropagation.set(span.context(), "x-country-code", "FO");
String countryCode = ExtraFieldPropagation.get(span.context(), "x-country-code");</programlisting>
<important>
<simpara>A difference from previous versions of Sleuth is that, with Brave, you must pass the list of baggage keys.
There are two properties to achieve this.
With the <literal>spring.sleuth.baggage-keys</literal>, you set keys that get prefixed with <literal>baggage-</literal> for HTTP calls and <literal>baggage_</literal> for messaging.
You can also use the <literal>spring.sleuth.propagation-keys</literal> property to pass a list of prefixed keys that are whitelisted without any prefix.</simpara>
You can also use the <literal>spring.sleuth.propagation-keys</literal> property to pass a list of prefixed keys that are whitelisted without any prefix.
Notice that there&#8217;s no <literal>x-</literal> in front of the header keys.</simpara>
</important>
<simpara>In order to automatically set the baggage values to Slf4j&#8217;s MDC, you have to set
the <literal>spring.sleuth.log.slf4j.whitelisted-mdc-keys</literal> property with a list of whitelisted
@@ -1954,10 +1955,6 @@ into the message.</simpara>
so that tracing headers get injected into the created Spring Kafka&#8217;s
<literal>Producer</literal> and <literal>Consumer</literal>.</simpara>
<simpara>To block this feature, set <literal>spring.sleuth.messaging.kafka.enabled</literal> to <literal>false</literal>.</simpara>
<note>
<simpara>We do not support context propagation via <literal>@KafkaListener</literal> annotation.
Check <link xl:href="https://github.com/spring-cloud/spring-cloud-sleuth/issues/1001">this issue for more information</link>.</simpara>
</note>
</section>
<section xml:id="_spring_jms">
<title>Spring JMS</title>