diff --git a/multi/multi__propagation.html b/multi/multi__propagation.html index 24f19b1c2..224ce8262 100644 --- a/multi/multi__propagation.html +++ b/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/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html
index eff9c10d7..81aff4f0a 100644
--- a/single/spring-cloud-sleuth.html
+++ b/single/spring-cloud-sleuth.html
@@ -449,7 +449,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/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml
index bc31a9b98..ed6a74519 100644
--- a/spring-cloud-sleuth.xml
+++ b/spring-cloud-sleuth.xml
@@ -1014,7 +1014,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: