diff --git a/2.0.x/multi/multi__propagation.html b/2.0.x/multi/multi__propagation.html index e00d22cfc..4eefa5f51 100644 --- a/2.0.x/multi/multi__propagation.html +++ b/2.0.x/multi/multi__propagation.html @@ -46,7 +46,7 @@ for you to create a bean of that type and we will set it in the x-vcap-request-id the field as-is but send the country-code and user-id fields on the wire as x-baggage-country-code and x-baggage-user-id, respectively:

Tracing.newBuilder().propagationFactory(
   ExtraFieldPropagation.newFactoryBuilder(B3Propagation.FACTORY)
                        .addField("x-vcap-request-id")
-                       .addPrefixedFields("baggage-", Arrays.asList("country-code", "user-id"))
+                       .addPrefixedFields("x-baggage-", Arrays.asList("country-code", "user-id"))
                        .build()
 );

Later, you can call the following code to affect the country code of the current trace context:

ExtraFieldPropagation.set("country-code", "FO");
 String countryCode = ExtraFieldPropagation.get("country-code");

Alternatively, if you have a reference to a trace context, you can use it explicitly, as shown in the following example:

ExtraFieldPropagation.set(span.context(), "country-code", "FO");
diff --git a/2.0.x/single/spring-cloud-sleuth.html b/2.0.x/single/spring-cloud-sleuth.html
index 9e06e75b4..3ec9bd81c 100644
--- a/2.0.x/single/spring-cloud-sleuth.html
+++ b/2.0.x/single/spring-cloud-sleuth.html
@@ -450,7 +450,7 @@ for you to create a bean of that type and we will set it in the x-vcap-request-id the field as-is but send the country-code and user-id fields on the wire as x-baggage-country-code and x-baggage-user-id, respectively:

Tracing.newBuilder().propagationFactory(
   ExtraFieldPropagation.newFactoryBuilder(B3Propagation.FACTORY)
                        .addField("x-vcap-request-id")
-                       .addPrefixedFields("baggage-", Arrays.asList("country-code", "user-id"))
+                       .addPrefixedFields("x-baggage-", Arrays.asList("country-code", "user-id"))
                        .build()
 );

Later, you can call the following code to affect the country code of the current trace context:

ExtraFieldPropagation.set("country-code", "FO");
 String countryCode = ExtraFieldPropagation.get("country-code");

Alternatively, if you have a reference to a trace context, you can use it explicitly, as shown in the following example:

ExtraFieldPropagation.set(span.context(), "country-code", "FO");
diff --git a/2.0.x/spring-cloud-sleuth.xml b/2.0.x/spring-cloud-sleuth.xml
index 303d97a37..bf5c5333c 100644
--- a/2.0.x/spring-cloud-sleuth.xml
+++ b/2.0.x/spring-cloud-sleuth.xml
@@ -1015,7 +1015,7 @@ The following example shows how to propagate x-vcap-request-idTracing.newBuilder().propagationFactory(
   ExtraFieldPropagation.newFactoryBuilder(B3Propagation.FACTORY)
                        .addField("x-vcap-request-id")
-                       .addPrefixedFields("baggage-", Arrays.asList("country-code", "user-id"))
+                       .addPrefixedFields("x-baggage-", Arrays.asList("country-code", "user-id"))
                        .build()
 );
 Later, you can call the following code to affect the country code of the current trace context: