diff --git a/multi/multi__introduction.html b/multi/multi__introduction.html index 3ea4a9260..86e7c15f8 100644 --- a/multi/multi__introduction.html +++ b/multi/multi__introduction.html @@ -137,8 +137,7 @@ Spring Cloud Sleuth understands that a header is baggage-related if the HTTP hea However, keep in mind that too many can decrease system throughput or increase RPC latency. In extreme cases, too much baggage can crash the application, due to exceeding transport-level message or header capacity.
The following example shows setting baggage on a span:
Span initialSpan = this.tracer.nextSpan().name("span").start(); ExtraFieldPropagation.set(initialSpan.context(), "foo", "bar"); -ExtraFieldPropagation.set(initialSpan.context(), "UPPER_CASE", "someValue"); -}
Baggage travels with the trace (every child span contains the baggage of its parent). +ExtraFieldPropagation.set(initialSpan.context(), "UPPER_CASE", "someValue");
Baggage travels with the trace (every child span contains the baggage of its parent). Zipkin has no knowledge of baggage and does not receive that information.
![]() | Important |
|---|---|
Starting from Sleuth 2.0.0 you have to pass the baggage key names explicitly in your project configuration. Read more about that setup here |
Tags are attached to a specific span. In other words, they are presented only for that particular span. However, you can search by tag to find the trace, assuming a span having the searched tag value exists.
If you want to be able to lookup a span based on baggage, you should add a corresponding entry as a tag in the root span.
![]() | Important |
|---|---|
The span must be in scope. |
The following listing shows integration tests that use baggage:
The setup.
diff --git a/multi/multi__propagation.html b/multi/multi__propagation.html
index 59db7f498..9f596e99f 100644
--- a/multi/multi__propagation.html
+++ b/multi/multi__propagation.html
@@ -57,7 +57,7 @@ You can also use the spring.sleuth.propagation-keys
Notice that there’s no x- in front of the header keys.
In order to automatically set the baggage values to Slf4j’s MDC, you have to set
the spring.sleuth.log.slf4j.whitelisted-mdc-keys property with a list of whitelisted
baggage and propagation keys. E.g. spring.sleuth.log.slf4j.whitelisted-mdc-keys=foo will set the value of the foo baggage into MDC.
![]() | Important |
|---|---|
Remember that adding entries to MDC can drastically decrease the performance of your application! |
The TraceContext.Extractor<C> reads trace identifiers and sampling status from an incoming request or message.
-The carrier is usually a request object or headers.
This utility is used in standard instrumentation (such as HttpServerHandler`) but can also be used for custom RPC or messaging code.
TraceContextOrSamplingFlags is usually used only with Tracer.nextSpan(extracted), unless you are
+The carrier is usually a request object or headers.
This utility is used in standard instrumentation (such as HttpServerHandler) but can also be used for custom RPC or messaging code.
TraceContextOrSamplingFlags is usually used only with Tracer.nextSpan(extracted), unless you are
sharing span IDs between a client and a server.
A normal instrumentation pattern is to create a span representing the server side of an RPC.
Extractor.extract might return a complete trace context when applied to an incoming client request.
Tracer.joinSpan attempts to continue this trace, using the same span ID if supported or creating a child span
diff --git a/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html
index b79549ec3..e74bc3722 100644
--- a/single/spring-cloud-sleuth.html
+++ b/single/spring-cloud-sleuth.html
@@ -137,8 +137,7 @@ Spring Cloud Sleuth understands that a header is baggage-related if the HTTP hea
However, keep in mind that too many can decrease system throughput or increase RPC latency.
In extreme cases, too much baggage can crash the application, due to exceeding transport-level message or header capacity.
The following example shows setting baggage on a span:
Span initialSpan = this.tracer.nextSpan().name("span").start(); ExtraFieldPropagation.set(initialSpan.context(), "foo", "bar"); -ExtraFieldPropagation.set(initialSpan.context(), "UPPER_CASE", "someValue"); -}
Baggage travels with the trace (every child span contains the baggage of its parent). +ExtraFieldPropagation.set(initialSpan.context(), "UPPER_CASE", "someValue");
Baggage travels with the trace (every child span contains the baggage of its parent). Zipkin has no knowledge of baggage and does not receive that information.
![]() | Important |
|---|---|
Starting from Sleuth 2.0.0 you have to pass the baggage key names explicitly in your project configuration. Read more about that setup here |
Tags are attached to a specific span. In other words, they are presented only for that particular span. However, you can search by tag to find the trace, assuming a span having the searched tag value exists.
If you want to be able to lookup a span based on baggage, you should add a corresponding entry as a tag in the root span.
![]() | Important |
|---|---|
The span must be in scope. |
The following listing shows integration tests that use baggage:
The setup.
@@ -486,7 +485,7 @@ You can also use the spring.sleuth.propagation-keys
Notice that there’s no x- in front of the header keys.
In order to automatically set the baggage values to Slf4j’s MDC, you have to set
the spring.sleuth.log.slf4j.whitelisted-mdc-keys property with a list of whitelisted
baggage and propagation keys. E.g. spring.sleuth.log.slf4j.whitelisted-mdc-keys=foo will set the value of the foo baggage into MDC.
![]() | Important |
|---|---|
Remember that adding entries to MDC can drastically decrease the performance of your application! |
The TraceContext.Extractor<C> reads trace identifiers and sampling status from an incoming request or message.
-The carrier is usually a request object or headers.
This utility is used in standard instrumentation (such as HttpServerHandler`) but can also be used for custom RPC or messaging code.
TraceContextOrSamplingFlags is usually used only with Tracer.nextSpan(extracted), unless you are
+The carrier is usually a request object or headers.
This utility is used in standard instrumentation (such as HttpServerHandler) but can also be used for custom RPC or messaging code.
TraceContextOrSamplingFlags is usually used only with Tracer.nextSpan(extracted), unless you are
sharing span IDs between a client and a server.
A normal instrumentation pattern is to create a span representing the server side of an RPC.
Extractor.extract might return a complete trace context when applied to an incoming client request.
Tracer.joinSpan attempts to continue this trace, using the same span ID if supported or creating a child span
diff --git a/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml
index 3670a6ac7..182a0af31 100644
--- a/spring-cloud-sleuth.xml
+++ b/spring-cloud-sleuth.xml
@@ -365,8 +365,7 @@ In extreme cases, too much baggage can crash the application, due to exceeding t