Skip to content

Commit 590ffa3

Browse files
Polished the docs, config props taken from classpath
2 parents 3ab6ec2 + cf8676c commit 590ffa3

File tree

8 files changed

+167
-38
lines changed

8 files changed

+167
-38
lines changed

README.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,22 @@ Sleuth and Zipkin https://content.pivotal.io/springone-platform-2017/distributed
616616

617617
You can check different setups of Sleuth and Brave https://github.com/openzipkin/sleuth-webmvc-example[in the openzipkin/sleuth-webmvc-example repository].
618618

619+
:doctype: book
620+
:idprefix:
621+
:idseparator: -
622+
:toc: left
623+
:toclevels: 4
624+
:tabsize: 4
625+
:numbered:
626+
:sectanchors:
627+
:sectnums:
628+
:icons: font
629+
:hide-uri-scheme:
630+
:docinfo: shared,private
631+
632+
:sc-ext: java
633+
:project-full-name: Spring Cloud Sleuth
634+
619635
== Features
620636

621637
* Adds trace and span IDs to the Slf4J MDC, so you can extract all the logs from a given trace or span in a log aggregator, as shown in the following example logs:

docs/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,18 @@
3434
<docs.whitelisted.branches>1.0.x,1.1.x,1.2.x,1.3.x,2.0.x,2.1.x
3535
</docs.whitelisted.branches>
3636
<main.basedir>${basedir}/..</main.basedir>
37+
<configprops.inclusionPattern>spring.sleuth.*|spring.zipkin.*</configprops.inclusionPattern>
3738
</properties>
39+
<dependencies>
40+
<dependency>
41+
<groupId>${project.groupId}</groupId>
42+
<artifactId>spring-cloud-starter-sleuth</artifactId>
43+
</dependency>
44+
<dependency>
45+
<groupId>${project.groupId}</groupId>
46+
<artifactId>spring-cloud-starter-zipkin</artifactId>
47+
</dependency>
48+
</dependencies>
3849
<profiles>
3950
<profile>
4051
<id>docs</id>
@@ -52,6 +63,10 @@
5263
<groupId>org.apache.maven.plugins</groupId>
5364
<artifactId>maven-resources-plugin</artifactId>
5465
</plugin>
66+
<plugin>
67+
<groupId>org.codehaus.mojo</groupId>
68+
<artifactId>exec-maven-plugin</artifactId>
69+
</plugin>
5570
<plugin>
5671
<groupId>org.asciidoctor</groupId>
5772
<artifactId>asciidoctor-maven-plugin</artifactId>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:doctype: book
2+
:idprefix:
3+
:idseparator: -
4+
:toc: left
5+
:toclevels: 4
6+
:tabsize: 4
7+
:numbered:
8+
:sectanchors:
9+
:sectnums:
10+
:icons: font
11+
:hide-uri-scheme:
12+
:docinfo: shared,private
13+
14+
:sc-ext: java
15+
:project-full-name: Spring Cloud Sleuth
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
|===
2+
|Name | Default | Description
3+
4+
|spring.sleuth.annotation.enabled | true |
5+
|spring.sleuth.async.configurer.enabled | true | Enable default AsyncConfigurer.
6+
|spring.sleuth.async.enabled | true | Enable instrumenting async related components so that the tracing information is passed between threads.
7+
|spring.sleuth.async.ignored-beans | | List of {@link java.util.concurrent.Executor} bean names that should be ignored and not wrapped in a trace representation.
8+
|spring.sleuth.baggage-keys | | List of baggage key names that should be propagated out of process. These keys will be prefixed with `baggage` before the actual key. This property is set in order to be backward compatible with previous Sleuth versions. @see brave.propagation.ExtraFieldPropagation.FactoryBuilder#addPrefixedFields(String, java.util.Collection)
9+
|spring.sleuth.enabled | true |
10+
|spring.sleuth.feign.enabled | true | Enable span information propagation when using Feign.
11+
|spring.sleuth.feign.processor.enabled | true | Enable post processor that wraps Feign Context in its tracing representations.
12+
|spring.sleuth.grpc.enabled | true | Enable span information propagation when using GRPC.
13+
|spring.sleuth.http.enabled | true |
14+
|spring.sleuth.http.legacy.enabled | false |
15+
|spring.sleuth.hystrix.strategy.enabled | true | Enable custom HystrixConcurrencyStrategy that wraps all Callable instances into their Sleuth representative - the TraceCallable.
16+
|spring.sleuth.hystrix.strategy.passthrough | false | When enabled the tracing information is passed to the Hystrix execution threads but spans are not created for each execution.
17+
|spring.sleuth.integration.enabled | true | Enable Spring Integration sleuth instrumentation.
18+
|spring.sleuth.integration.patterns | [!hystrixStreamOutput*, *] | An array of patterns against which channel names will be matched. @see org.springframework.integration.config.GlobalChannelInterceptor#patterns() Defaults to any channel name not matching the Hystrix Stream channel name.
19+
|spring.sleuth.integration.websockets.enabled | true | Enable tracing for WebSockets.
20+
|spring.sleuth.keys.http.headers | | Additional headers that should be added as tags if they exist. If the header value is multi-valued, the tag value will be a comma-separated, single-quoted list.
21+
|spring.sleuth.keys.http.prefix | http. | Prefix for header names if they are added as tags.
22+
|spring.sleuth.local-keys | | Same as {@link #propagationKeys} except that this field is not propagated to remote services. @see brave.propagation.ExtraFieldPropagation.FactoryBuilder#addRedactedField(String)
23+
|spring.sleuth.log.slf4j.enabled | true | Enable a {@link Slf4jScopeDecorator} that prints tracing information in the logs.
24+
|spring.sleuth.log.slf4j.whitelisted-mdc-keys | | A list of keys to be put from baggage to MDC.
25+
|spring.sleuth.messaging.enabled | false | Should messaging be turned on.
26+
|spring.sleuth.messaging.jms.enabled | false |
27+
|spring.sleuth.messaging.jms.remote-service-name | jms |
28+
|spring.sleuth.messaging.kafka.enabled | false |
29+
|spring.sleuth.messaging.kafka.remote-service-name | kafka |
30+
|spring.sleuth.messaging.rabbit.enabled | false |
31+
|spring.sleuth.messaging.rabbit.remote-service-name | rabbitmq |
32+
|spring.sleuth.opentracing.enabled | true |
33+
|spring.sleuth.propagation-keys | | List of fields that are referenced the same in-process as it is on the wire. For example, the name "x-vcap-request-id" would be set as-is including the prefix. <p> Note: {@code fieldName} will be implicitly lower-cased. @see brave.propagation.ExtraFieldPropagation.FactoryBuilder#addField(String)
34+
|spring.sleuth.propagation.tag.enabled | true | Enables a {@link TagPropagationFinishedSpanHandler} that adds extra propagated fields to span tags.
35+
|spring.sleuth.propagation.tag.whitelisted-keys | | A list of keys to be put from extra propagation fields to span tags.
36+
|spring.sleuth.reactor.enabled.enabled | true | When true enables instrumentation for reactor.
37+
|spring.sleuth.redis.enabled | true | Enable span information propagation when using Redis.
38+
|spring.sleuth.rxjava.schedulers.hook.enabled | true | Enable support for RxJava via RxJavaSchedulersHook.
39+
|spring.sleuth.rxjava.schedulers.ignoredthreads | [HystrixMetricPoller, ^RxComputation.*$] | Thread names for which spans will not be sampled.
40+
|spring.sleuth.sampler.probability | | Probability of requests that should be sampled. E.g. 1.0 - 100% requests should be sampled. The precision is whole-numbers only (i.e. there's no support for 0.1% of the traces).
41+
|spring.sleuth.sampler.rate | 10 | A rate per second can be a nice choice for low-traffic endpoints as it allows you surge protection. For example, you may never expect the endpoint to get more than 50 requests per second. If there was a sudden surge of traffic, to 5000 requests per second, you would still end up with 50 traces per second. Conversely, if you had a percentage, like 10%, the same surge would end up with 500 traces per second, possibly overloading your storage. Amazon X-Ray includes a rate-limited sampler (named Reservoir) for this purpose. Brave has taken the same approach via the {@link brave.sampler.RateLimitingSampler}.
42+
|spring.sleuth.scheduled.enabled | true | Enable tracing for {@link org.springframework.scheduling.annotation.Scheduled}.
43+
|spring.sleuth.scheduled.skip-pattern | org.springframework.cloud.netflix.hystrix.stream.HystrixStreamTask | Pattern for the fully qualified name of a class that should be skipped.
44+
|spring.sleuth.supports-join | true | True means the tracing system supports sharing a span ID between a client and server.
45+
|spring.sleuth.trace-id128 | false | When true, generate 128-bit trace IDs instead of 64-bit ones.
46+
|spring.sleuth.web.additional-skip-pattern | | Additional pattern for URLs that should be skipped in tracing. This will be appended to the {@link SleuthWebProperties#skipPattern}.
47+
|spring.sleuth.web.client.enabled | true | Enable interceptor injecting into {@link org.springframework.web.client.RestTemplate}.
48+
|spring.sleuth.web.client.skip-pattern | | Pattern for URLs that should be skipped in client side tracing.
49+
|spring.sleuth.web.enabled | true | When true enables instrumentation for web applications.
50+
|spring.sleuth.web.exception-logging-filter-enabled | true | Flag to toggle the presence of a filter that logs thrown exceptions.
51+
|spring.sleuth.web.exception-throwing-filter-enabled | true | Flag to toggle the presence of a filter that logs thrown exceptions. @deprecated use {@link #exceptionLoggingFilterEnabled}
52+
|spring.sleuth.web.filter-order | | Order in which the tracing filters should be registered. Defaults to {@link TraceHttpAutoConfiguration#TRACING_FILTER_ORDER}.
53+
|spring.sleuth.web.ignore-auto-configured-skip-patterns | false | If set to true, auto-configured skip patterns will be ignored. @see TraceWebAutoConfiguration
54+
|spring.sleuth.web.skip-pattern | /api-docs.*\|/swagger.*\|.*\.png\|.*\.css\|.*\.js\|.*\.html\|/favicon.ico\|/hystrix.stream | Pattern for URLs that should be skipped in tracing.
55+
|spring.sleuth.zuul.enabled | true | Enable span information propagation when using Zuul.
56+
|spring.zipkin.activemq.message-max-bytes | 100000 | Maximum number of bytes for a given message with spans sent to Zipkin over ActiveMQ.
57+
|spring.zipkin.activemq.queue | zipkin | Name of the ActiveMQ queue where spans should be sent to Zipkin.
58+
|spring.zipkin.base-url | http://localhost:9411/ | URL of the zipkin query server instance. You can also provide the service id of the Zipkin server if Zipkin's registered in service discovery (e.g. https://zipkinserver/).
59+
|spring.zipkin.compression.enabled | false |
60+
|spring.zipkin.discovery-client-enabled | | If set to {@code false}, will treat the {@link ZipkinProperties#baseUrl} as a URL always.
61+
|spring.zipkin.enabled | true | Enables sending spans to Zipkin.
62+
|spring.zipkin.encoder | | Encoding type of spans sent to Zipkin. Set to {@link SpanBytesEncoder#JSON_V1} if your server is not recent.
63+
|spring.zipkin.kafka.topic | zipkin | Name of the Kafka topic where spans should be sent to Zipkin.
64+
|spring.zipkin.locator.discovery.enabled | false | Enabling of locating the host name via service discovery.
65+
|spring.zipkin.message-timeout | 1 | Timeout in seconds before pending spans will be sent in batches to Zipkin.
66+
|spring.zipkin.rabbitmq.queue | zipkin | Name of the RabbitMQ queue where spans should be sent to Zipkin.
67+
|spring.zipkin.sender.type | | Means of sending spans to Zipkin.
68+
|spring.zipkin.service.name | | The name of the service, from which the Span was sent via HTTP, that should appear in Zipkin.
69+
70+
|===
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:numbered!:
2+
[appendix]
3+
[[common-application-properties]]
4+
== Common application properties
5+
6+
include::_attributes.adoc[]
7+
8+
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
9+
This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them.
10+
11+
NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
12+
Also, you can define your own properties.
13+
14+
include::_configprops.adoc[]

docs/src/main/asciidoc/features.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include::_attributes.adoc[]
2+
13
== Features
24

35
* Adds trace and span IDs to the Slf4J MDC, so you can extract all the logs from a given trace or span in a log aggregator, as shown in the following example logs:

0 commit comments

Comments
 (0)