Sets rate limiter sampler as default
fixes gh-1398
This commit is contained in:
@@ -40,9 +40,6 @@ could set `logging.level.org.springframework.web.servlet.DispatcherServlet=DEBUG
|
||||
|
||||
NOTE: Set `spring.application.name=myService` (for instance) to see the service name as well as the trace and span IDs.
|
||||
|
||||
IMPORTANT: If you use Zipkin, configure the probability of spans exported by setting `spring.sleuth.sampler.probability`
|
||||
(default: 0.1, which is 10 percent). Otherwise, you might think that Sleuth is not working be cause it omits some spans.
|
||||
|
||||
include::intro.adoc[]
|
||||
|
||||
include::features.adoc[]
|
||||
|
||||
@@ -50,9 +50,6 @@ CAUTION: `spring-cloud-sleuth-stream` is deprecated and should no longer be used
|
||||
|
||||
* Spring Cloud Sleuth is https://opentracing.io/[OpenTracing] compatible.
|
||||
|
||||
IMPORTANT: If you use Zipkin, configure the probability of spans exported by setting `spring.sleuth.sampler.probability`
|
||||
(default: 0.1, which is 10 percent). Otherwise, you might think that Sleuth is not working be cause it omits some spans.
|
||||
|
||||
NOTE: The SLF4J MDC is always set and logback users immediately see the trace and span IDs in logs per the example
|
||||
shown earlier.
|
||||
Other logging systems have to configure their own formatter to get the same result.
|
||||
|
||||
@@ -69,6 +69,6 @@ Run this app and then hit the home page. You will see traceId and spanId populat
|
||||
|
||||
IMPORTANT: instead of logging the request in the handler explicitly, you could set `logging.level.org.springframework.web.servlet.DispatcherServlet=DEBUG`
|
||||
|
||||
IMPORTANT: If you use Zipkin, configure the probability of spans exported by setting (for `2.0.x`) `spring.sleuth.sampler.probability` or (up till `2.0.x`)`spring.sleuth.sampler.percentage` (default: 0.1, which is 10 percent). Otherwise, you might think that Sleuth is not working because it omits some spans.
|
||||
IMPORTANT: If you use Zipkin (up till 2.1.x), configure the probability of spans exported by setting `spring.sleuth.sampler.percentage` (default: 0.1, which is 10 percent). Otherwise, you might think that Sleuth is not working because it omits some spans. Starting from 2.2.0, Sleuth will default to rate limited sampler. That means that it will sample up to 1000 transactions per second.
|
||||
|
||||
IMPORTANT: Set `spring.application.name=bar` (for instance) to see the service name as well as the trace and span ids.
|
||||
@@ -315,11 +315,10 @@ Span nextSpan(final Request input) {
|
||||
By default Spring Cloud Sleuth sets all spans to non-exportable.
|
||||
That means that traces appear in logs but not in any remote store.
|
||||
For testing the default is often enough, and it probably is all you need if you use only the logs (for example, with an ELK aggregator).
|
||||
If you export span data to Zipkin, there is also an `Sampler.ALWAYS_SAMPLE` setting that exports everything and a `ProbabilityBasedSampler` setting that samples a fixed fraction of spans.
|
||||
If you export span data to Zipkin, there is also an `Sampler.ALWAYS_SAMPLE` setting that exports everything, `RateLimitingSampler` setting that samples X transactions per second (defaults to `1000`) or `ProbabilityBasedSampler` setting that samples a fixed fraction of spans.
|
||||
|
||||
NOTE: The `ProbabilityBasedSampler` is the default if you use `spring-cloud-sleuth-zipkin`.
|
||||
You can configure the exports by setting `spring.sleuth.sampler.probability`.
|
||||
The passed value needs to be a double from `0.0` to `1.0`.
|
||||
NOTE: The `RateLimitingSampler` is the default if you use `spring-cloud-sleuth-zipkin`.
|
||||
You can configure the rate limit by setting `spring.sleuth.sampler.rate`.
|
||||
|
||||
A sampler can be installed by creating a bean definition, as shown in the following example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user