diff --git a/multi/multi__propagation.html b/multi/multi__propagation.html index 177412fff..f06ab3d51 100644 --- a/multi/multi__propagation.html +++ b/multi/multi__propagation.html @@ -21,10 +21,10 @@ injector = tracing.propagation().injector(Request.Builder::addHeader); // before a request is sent, add the current span's context to it injector.inject(span.context(), request);

The following example shows how server-side propagation might work:

// configure a function that extracts the trace context from a request
-extracted = tracing.propagation().extractor(Request::getHeader);
+extractor = tracing.propagation().extractor(Request::getHeader);
 
 // when a server receives a request, it joins or starts a new trace
-span = tracer.nextSpan(extracted, request);

5.1 Propagating extra fields

Sometimes you need to propagate extra fields, such as a request ID or an alternate trace context. +span = tracer.nextSpan(extractor.extract(request));

5.1 Propagating extra fields

Sometimes you need to propagate extra fields, such as a request ID or an alternate trace context. For example, if you are in a Cloud Foundry environment, you might want to pass the request ID, as shown in the following example:

// when you initialize the builder, define the extra field you want to propagate
 tracingBuilder.propagationFactory(
   ExtraFieldPropagation.newFactory(B3Propagation.FACTORY, "x-vcap-request-id")
diff --git a/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html
index 2c4ceaf3d..231bebf4d 100644
--- a/single/spring-cloud-sleuth.html
+++ b/single/spring-cloud-sleuth.html
@@ -398,10 +398,10 @@ injector = tracing.propagation().injector(Request.Builder::addHeader);
 
 // before a request is sent, add the current span's context to it
 injector.inject(span.context(), request);

The following example shows how server-side propagation might work:

// configure a function that extracts the trace context from a request
-extracted = tracing.propagation().extractor(Request::getHeader);
+extractor = tracing.propagation().extractor(Request::getHeader);
 
 // when a server receives a request, it joins or starts a new trace
-span = tracer.nextSpan(extracted, request);

5.1 Propagating extra fields

Sometimes you need to propagate extra fields, such as a request ID or an alternate trace context. +span = tracer.nextSpan(extractor.extract(request));

5.1 Propagating extra fields

Sometimes you need to propagate extra fields, such as a request ID or an alternate trace context. For example, if you are in a Cloud Foundry environment, you might want to pass the request ID, as shown in the following example:

// when you initialize the builder, define the extra field you want to propagate
 tracingBuilder.propagationFactory(
   ExtraFieldPropagation.newFactory(B3Propagation.FACTORY, "x-vcap-request-id")
diff --git a/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml
index bfb0b75d1..8bcf6928f 100644
--- a/spring-cloud-sleuth.xml
+++ b/spring-cloud-sleuth.xml
@@ -940,10 +940,10 @@ injector = tracing.propagation().injector(Request.Builder::addHeader);
 injector.inject(span.context(), request);
 The following example shows how server-side propagation might work:
 // configure a function that extracts the trace context from a request
-extracted = tracing.propagation().extractor(Request::getHeader);
+extractor = tracing.propagation().extractor(Request::getHeader);
 
 // when a server receives a request, it joins or starts a new trace
-span = tracer.nextSpan(extracted, request);
+span = tracer.nextSpan(extractor.extract(request));
 
Propagating extra fields Sometimes you need to propagate extra fields, such as a request ID or an alternate trace context.