From 0e59660298b492cf9526dab228f90ac23ea2d220 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 1 Aug 2018 13:05:22 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi__introduction.html | 5 ++--- single/spring-cloud-sleuth.html | 5 ++--- spring-cloud-sleuth.xml | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/multi/multi__introduction.html b/multi/multi__introduction.html index 081976882..61fb20321 100644 --- a/multi/multi__introduction.html +++ b/multi/multi__introduction.html @@ -136,9 +136,8 @@ Baggage travels together with the trace and is attached to every span. Spring Cloud Sleuth understands that a header is baggage-related if the HTTP header is prefixed with baggage- and, for messaging, it starts with baggage_.

[Important]Important

There is currently no limitation of the count or size of baggage items. 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();
-try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(initialSpan)) {
-	ExtraFieldPropagation.set("foo", "bar");
-	ExtraFieldPropagation.set("UPPER_CASE", "someValue");
+ExtraFieldPropagation.set(initialSpan.context(), "foo", "bar");
+ExtraFieldPropagation.set(initialSpan.context(),"UPPER_CASE", "someValue");
 }

Baggage versus Span Tags

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]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. diff --git a/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html index 573597444..b3387247e 100644 --- a/single/spring-cloud-sleuth.html +++ b/single/spring-cloud-sleuth.html @@ -136,9 +136,8 @@ Baggage travels together with the trace and is attached to every span. Spring Cloud Sleuth understands that a header is baggage-related if the HTTP header is prefixed with baggage- and, for messaging, it starts with baggage_.

[Important]Important

There is currently no limitation of the count or size of baggage items. 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();
-try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(initialSpan)) {
-	ExtraFieldPropagation.set("foo", "bar");
-	ExtraFieldPropagation.set("UPPER_CASE", "someValue");
+ExtraFieldPropagation.set(initialSpan.context(), "foo", "bar");
+ExtraFieldPropagation.set(initialSpan.context(),"UPPER_CASE", "someValue");
 }

Baggage versus Span Tags

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]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. diff --git a/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml index 057ab4925..dfb648457 100644 --- a/spring-cloud-sleuth.xml +++ b/spring-cloud-sleuth.xml @@ -364,9 +364,8 @@ In extreme cases, too much baggage can crash the application, due to exceeding t The following example shows setting baggage on a span: Span initialSpan = this.tracer.nextSpan().name("span").start(); -try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(initialSpan)) { - ExtraFieldPropagation.set("foo", "bar"); - ExtraFieldPropagation.set("UPPER_CASE", "someValue"); +ExtraFieldPropagation.set(initialSpan.context(), "foo", "bar"); +ExtraFieldPropagation.set(initialSpan.context(),"UPPER_CASE", "someValue"); }

Baggage versus Span Tags