Skip to content

Commit 1d96c8c

Browse files
authored
Proofread Trace docs (spring-attic#1353)
Proofread the Trace docs, also updates trace doc to reflect changes in spring-attic#749. Contributes to spring-attic#1318.
1 parent 1902c69 commit 1d96c8c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/src/main/asciidoc/trace.adoc

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
== Spring Cloud Sleuth
22

33
https://cloud.spring.io/spring-cloud-sleuth/[Spring Cloud Sleuth] is an instrumentation framework for Spring Boot applications.
4-
It captures trace informations and can forward traces to services like Zipkin for storage and analysis.
4+
It captures trace information and can forward traces to services like Zipkin for storage and analysis.
55

66
Google Cloud Platform provides its own managed distributed tracing service called https://cloud.google.com/trace/[Stackdriver Trace].
77
Instead of running and maintaining your own Zipkin instance and storage, you can use Stackdriver Trace to store traces, view trace details, generate latency distributions graphs, and generate performance regression reports.
@@ -10,7 +10,6 @@ This Spring Cloud GCP starter can forward Spring Cloud Sleuth traces to Stackdri
1010

1111
Maven coordinates, using Spring Cloud GCP BOM:
1212

13-
1413
[source,xml]
1514
----
1615
<dependency>
@@ -33,15 +32,15 @@ Navigate to the https://console.cloud.google.com/apis/api/cloudtrace.googleapis.
3332

3433
[NOTE]
3534
====
36-
If you are already using a Zipkin server capturing trace information from multiple platform/frameworks, you also use a https://cloud.google.com/trace/docs/zipkin[Stackdriver Zipkin proxy] to forward those traces to Stackdriver Trace without modifying existing applications.
35+
If you are already using a Zipkin server capturing trace information from multiple platform/frameworks, you can also use a https://cloud.google.com/trace/docs/zipkin[Stackdriver Zipkin proxy] to forward those traces to Stackdriver Trace without modifying existing applications.
3736
====
3837

3938
=== Tracing
4039

4140
Spring Cloud Sleuth uses the https://github.com/openzipkin/brave[Brave tracer] to generate traces.
4241
This integration enables Brave to use the https://github.com/openzipkin/zipkin-gcp/tree/master/propagation-stackdriver[`StackdriverTracePropagation`] propagation.
4342

44-
A propagation is responsible for extracting trace context from an entity (e.g., an HTTP servlet request) and for injecting trace context into an entity.
43+
A propagation is responsible for extracting trace context from an entity (e.g., an HTTP servlet request) and injecting trace context into an entity.
4544
A canonical example of the propagation usage is a web server that receives an HTTP request, which triggers other HTTP requests from the server before returning an HTTP response to the original caller.
4645
In the case of `StackdriverTracePropagation`, first it looks for trace context in the `x-cloud-trace-context` key (e.g., an HTTP request header).
4746
The value of the `x-cloud-trace-context` key can be formatted in three different ways:
@@ -56,8 +55,7 @@ The value of the `x-cloud-trace-context` key can be formatted in three different
5655
Since Stackdriver Trace doesn't support span joins, a new span ID is always generated, regardless of the one specified in `x-cloud-trace-context`.
5756

5857
`TRACE_TRUE` can either be `0` if the entity should be untraced, or `1` if it should be traced.
59-
However, at the moment, if `TRACE_TRUE` is set to `1`, the entity isn't necessarily traced.
60-
Currently, to make sure a request is traced, the Sleuth property `spring.sleuth.sampler.probability=1` should be used, to trace every entity.
58+
This field forces the decision of whether or not to trace the request; if omitted then the decision is deferred to the sampler.
6159

6260
If a `x-cloud-trace-context` key isn't found, `StackdriverTracePropagation` falls back to tracing with the https://github.com/openzipkin/b3-propagation[X-B3 headers].
6361

@@ -97,7 +95,9 @@ spring.sleuth.web.skipPattern=(^cleanup.*|.+favicon.*) # Ignore some URL paths.
9795
Spring Cloud GCP Trace does override some Sleuth configurations:
9896

9997
- Always uses 128-bit Trace IDs. This is required by Stackdriver Trace.
100-
- Does not use Span joins. Span joins will share the span ID between the client and server Spans. Stackdriver requires that every Span ID within a Trace to be unique, so Span joins are not supported.
98+
- Does not use Span joins.
99+
Span joins will share the span ID between the client and server Spans.
100+
Stackdriver requires that every Span ID within a Trace to be unique, so Span joins are not supported.
101101
- Uses `StackdriverHttpClientParser` and `StackdriverHttpServerParser` by default to populate Stackdriver related fields.
102102

103103
=== Integration with Logging
@@ -106,7 +106,6 @@ Integration with Stackdriver Logging is available through the link:logging.adoc[
106106
If the Trace integration is used together with the Logging one, the request logs will be associated to the corresponding traces.
107107
The trace logs can be viewed by going to the https://console.cloud.google.com/traces/traces[Google Cloud Console Trace List], selecting a trace and pressing the `Logs -> View` link in the `Details` section.
108108

109-
110109
=== Sample
111110

112111
A https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-samples/spring-cloud-gcp-trace-sample[sample application] and a https://codelabs.developers.google.com/codelabs/cloud-spring-cloud-gcp-trace/index.html[codelab] are available.

0 commit comments

Comments
 (0)