Bumping versions

This commit is contained in:
buildmaster
2020-08-12 05:29:01 +00:00
parent 131e94e4f6
commit ba19f037df
2 changed files with 23 additions and 13 deletions

View File

@@ -40,6 +40,7 @@
|spring.sleuth.rxjava.schedulers.ignoredthreads | [HystrixMetricPoller, ^RxComputation.*$] | Thread names for which spans will not be sampled.
|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).
|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}.
|spring.sleuth.sampler.refresh.enabled | true | Enable refresh scope for sampler.
|spring.sleuth.scheduled.enabled | true | Enable tracing for {@link org.springframework.scheduling.annotation.Scheduled}.
|spring.sleuth.scheduled.skip-pattern | | Pattern for the fully qualified name of a class that should be skipped.
|spring.sleuth.supports-join | true | True means the tracing system supports sharing a span ID between a client and server.

View File

@@ -60,27 +60,36 @@ public class SamplerAutoConfigurationTests {
@Test
void should_use_RateLimitedSampler_withTracingCustomizer() {
this.contextRunner.withUserConfiguration(WithTracingCustomizer.class).run((context -> {
final Sampler bean = context.getBean(Sampler.class);
BDDAssertions.then(bean).isInstanceOf(RateLimitingSampler.class);
}));
this.contextRunner.withUserConfiguration(WithTracingCustomizer.class)
.run((context -> {
final Sampler bean = context.getBean(Sampler.class);
BDDAssertions.then(bean).isInstanceOf(RateLimitingSampler.class);
}));
}
@Test
void should_use_refresh_scope_sampler_when_no_property_passed_and_refresh_scope_present() {
this.contextRunner.withUserConfiguration(WithTracingCustomizer.class, WithRefreshScope.class).run((context -> {
BDDAssertions.then(context.containsBean("defaultTraceSampler")).as("refresh scope bean should be set")
.isTrue();
BDDAssertions.then(context.containsBean("defaultNonRefreshScopeTraceSampler"))
.as("non refresh scope bean should not be picked").isFalse();
}));
this.contextRunner.withUserConfiguration(WithTracingCustomizer.class,
WithRefreshScope.class).run((context -> {
BDDAssertions.then(context.containsBean("defaultTraceSampler"))
.as("refresh scope bean should be set").isTrue();
BDDAssertions
.then(context
.containsBean("defaultNonRefreshScopeTraceSampler"))
.as("non refresh scope bean should not be picked").isFalse();
}));
}
@Test
void should_use_non_refresh_scope_sampler_when_property_passed_and_refresh_scope_present() {
this.contextRunner.withUserConfiguration(WithTracingCustomizer.class, WithRefreshScope.class)
.withPropertyValues("spring.sleuth.sampler.refresh.enabled=false").run((context -> {
BDDAssertions.then(context.containsBean("defaultNonRefreshScopeTraceSampler"))
this.contextRunner
.withUserConfiguration(WithTracingCustomizer.class,
WithRefreshScope.class)
.withPropertyValues("spring.sleuth.sampler.refresh.enabled=false")
.run((context -> {
BDDAssertions
.then(context
.containsBean("defaultNonRefreshScopeTraceSampler"))
.as("non refresh scope bean should be picked").isTrue();
BDDAssertions.then(context.containsBean("defaultTraceSampler"))
.as("refresh scope bean should not be set").isFalse();