From 75338d8157478d34a1ce37ebd821849832d3a2a7 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Sun, 6 May 2018 12:31:37 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi__propagation.html | 4 ++-- single/spring-cloud-sleuth.html | 4 ++-- spring-cloud-sleuth.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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.